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

[Errno 2] No such file tokenizer_config.json #337

Open
RCLaplace opened this issue Jun 13, 2024 · 2 comments
Open

[Errno 2] No such file tokenizer_config.json #337

RCLaplace opened this issue Jun 13, 2024 · 2 comments

Comments

@RCLaplace
Copy link

while using the load_model function, I encountered an issue exporting the operator 'FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\v_ztfang\.cache\huggingface\hub\models--bert-base-uncased\snapshots\86b5e0934494bd15c9632b12f734a8a67f723594\tokenizer_config.json'

It seem to be an error occurring while downloading tokenizer_config.json file from Huggingface, but I can see in the terminal output that the tokenizer_config.json file is downloaded to 100% After the download was complete, I looked for its folder and found that all the paths were there except for the After the download was complete, I looked for its folder and found that it was all there, but there was no tokenizer_config.json

Thank you for your time and assistance.

Versions
Pytorch : 2.3.0
CUDA: 12.01

The code involved: model = load_model("groundingdino/config/GroundingDINO_SwinT_OGC.py", "weights/groundingdino_swint_ogc.pth")

Terminal output:
UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at C:\actions-runner_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\native\TensorShape.cpp:3588.)
final text_encoder_type: bert-base-uncased
tokenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████| 48.0/48.0 [00:00<00:00, 12.0kB/s]
Traceback (most recent call last):
File "D:\work\2024\6\GroundingDINO\demo.py", line 14, in
model = load_model("groundingdino/config/GroundingDINO_SwinT_OGC.py", "weights/groundingdino_swint_ogc.pth")
File "D:\work\2024\6\GroundingDINO\groundingdino\util\inference.py", line 32, in load_model
model = build_model(args)
File "D:\work\2024\6\GroundingDINO\groundingdino\models_init_.py", line 17, in build_model
model = build_func(args)
File "D:\work\2024\6\GroundingDINO\groundingdino\models\GroundingDINO\groundingdino.py", line 388, in build_groundingdino
model = GroundingDINO(
File "D:\work\2024\6\GroundingDINO\groundingdino\models\GroundingDINO\groundingdino.py", line 107, in init
self.tokenizer = get_tokenlizer.get_tokenlizer(text_encoder_type)
File "D:\work\2024\6\GroundingDINO\groundingdino\util\get_tokenlizer.py", line 19, in get_tokenlizer
tokenizer = AutoTokenizer.from_pretrained(text_encoder_type)
File "E:\software\VS2019\env\0\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 817, in from_pretrained
tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
File "E:\software\VS2019\env\0\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 670, in get_tokenizer_config
with open(resolved_config_file, encoding="utf-8") as reader:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\v_ztfang\.cache\huggingface\hub\models--bert-base-uncased\snapshots\86b5e0934494bd15c9632b12f734a8a67f723594\tokenizer_config.json'

@liyan1997
Copy link

代码修改项
下载不了应该是网络的问题,猜测你大概也是中国人,我昨天也刚遇到这个问题,你试试这个方法吧,我自己鼓捣的,我的问题解决了,看你运气了

@ZYJIQVV
Copy link

ZYJIQVV commented Jul 25, 2024

@liyan1997 蟹蟹!救了大命了

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

3 participants