Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileNotFoundError: [Errno 2] No such file or directory: 'data/bert-large-uncased/config.json' #12

Open
letitiabanana opened this issue Sep 16, 2023 · 1 comment

Comments

@letitiabanana
Copy link

Plz help!!!!!!! Thank you so much!!!!!!!!!! Really need to solve this asap!!!!!
I tried to run the refcoco grounding task with this command
python3 run.py --task "refcoco_bbox" --dist "all" --config "configs/finetune/refcoco_grounding_large.yaml" --checkpoint "x2vlm_ckpts_2release/x2vlm_large_1b.th" --output_dir "output/tmp"

I got the follwing error. I am very new to the field and cannot figure out why. Do I need to download config file from huggingface or something?
Traceback (most recent call last):
File "Grounding_bbox.py", line 283, in
main(args, config)
File "Grounding_bbox.py", line 118, in main
model = XVLMForGrounding(config=config)
File "/home/letitiabanana/X2-VLM/models/model_grounding.py", line 7, in init
use_contrastive_loss=False, use_matching_loss=False, use_mlm_loss=False, use_bbox_loss=True)
File "/home/letitiabanana/X2-VLM/models/xvlm.py", line 476, in init
config_text=config_text)
File "/home/letitiabanana/X2-VLM/models/xvlm.py", line 541, in build_text_encoder
use_mlm_loss=use_mlm_loss, config_text=config_text)
File "/home/letitiabanana/X2-VLM/models/xvlm.py", line 289, in build_text_encoder
cross_start_at=config['text_fusion_start_at'])
File "/home/letitiabanana/X2-VLM/models/xvlm.py", line 130, in get_bert_config
config = BertConfig.from_json_file(os.path.join(encoder_rpath, 'config.json'))
File "/home/letitiabanana/anaconda3/envs/x2vlm/lib/python3.7/site-packages/transformers/configuration_utils.py", line 644, in from_json_file
config_dict = cls._dict_from_json_file(json_file)
File "/home/letitiabanana/anaconda3/envs/x2vlm/lib/python3.7/site-packages/transformers/configuration_utils.py", line 649, in _dict_from_json_file
with open(json_file, "r", encoding="utf-8") as reader:
FileNotFoundError: [Errno 2] No such file or directory: 'data/bert-large-uncased/config.json'

@NeverMoreLCH
Copy link

Has solved? I meet the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants