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: file "/root/.cache/autodistill/groundingdino/GroundingDINO_SwinT_OGC.py" does not exist #50

Closed
hahapt opened this issue Sep 20, 2023 · 4 comments

Comments

@hahapt
Copy link

hahapt commented Sep 20, 2023

When I try to use GroundedSAM to generate annotation, It went something wrong.

trying to load grounding dino directly
downloading dino model weights
Traceback (most recent call last):
File "/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/autodistill_grounded_sam/helpers.py", line 89, in load_grounding_dino
device=DEVICE,
File "/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/groundingdino/util/inference.py", line 121, in init
device=device
File "/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/groundingdino/util/inference.py", line 29, in load_model
args = SLConfig.fromfile(model_config_path)
File "/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/groundingdino/util/slconfig.py", line 185, in fromfile
cfg_dict, cfg_text = SLConfig._file2dict(filename)
File "/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/groundingdino/util/slconfig.py", line 79, in _file2dict
check_file_exist(filename)
File "/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/groundingdino/util/slconfig.py", line 23, in check_file_exist
raise FileNotFoundError(msg_tmpl.format(filename))
FileNotFoundError: file "/root/.cache/autodistill/groundingdino/GroundingDINO_SwinT_OGC.py" does not exist

@capjamesg
Copy link
Member

Thank you for your comment! This can happen when the installation process doesn't complete successfully. Please run:

rm -rf ~/.cache/autodistill/

Then, run Autodistill again.

Let me know if this doesn't work!

@hahapt
Copy link
Author

hahapt commented Sep 21, 2023

Thank you for your comment! This can happen when the installation process doesn't complete successfully. Please run:

rm -rf ~/.cache/autodistill/

Then, run Autodistill again.

Let me know if this doesn't work!

I have figured it by download GroundingDINO_SwinT_OGC.py by myself, for the reason that my machine cannot connect to the network. But it went wrong when download huggingface_hub, I cannot figure out which need to download and install. The wrong information is below, is there any solution to figure it?

trying to load grounding dino directly
/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/torch/functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ../aten/src/ATen/native/TensorShape.cpp:3190.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
final text_encoder_type: bert-base-uncased
downloading dino model weights
final text_encoder_type: bert-base-uncased
Traceback (most recent call last):
File "/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/transformers/utils/hub.py", line 429, in cached_file
local_files_only=local_files_only,
File "/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/workspace/hpt/anaconda3/envs/paddle_env/lib/python3.7/site-packages/huggingface_hub/file_download.py", line 1293, in hf_hub_download
"Connection error, and we cannot find the requested files in"
huggingface_hub.utils._errors.LocalEntryNotFoundError: Connection error, and we cannot find the requested files in the disk cache. Please try again or make sure your Internet connection is on.

@capjamesg
Copy link
Member

If you have a network connection and you are seeing this issue, consider rebooting your machine.

@capjamesg
Copy link
Member

Do you still need assistance with this Issue?

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