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

Repository not found #22

Open
Parshant-Arora opened this issue Jul 12, 2022 · 1 comment
Open

Repository not found #22

Parshant-Arora opened this issue Jul 12, 2022 · 1 comment

Comments

@Parshant-Arora
Copy link

Parshant-Arora commented Jul 12, 2022

I tried to run inference.py but it gives the error

/configuration_utils.py", line 609, in _get_config_dict
    user_agent=user_agent,
  File "/usr/local/lib/python3.7/dist-packages/transformers/utils/hub.py", line 292, in cached_path
    local_files_only=local_files_only,
  File "/usr/local/lib/python3.7/dist-packages/transformers/utils/hub.py", line 495, in get_from_cache
    _raise_for_status(r)
  File "/usr/local/lib/python3.7/dist-packages/transformers/utils/hub.py", line 418, in _raise_for_status
    f"401 Client Error: Repository not found for url: {response.url}. "
transformers.utils.hub.RepositoryNotFoundError: 401 Client Error: Repository not found for url: https://huggingface.co/checkpoint-3060/resolve/main/config.json. If the repo is private, make sure you are authenticated.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "inference.py", line 104, in <module>
    model = BartForConditionalGeneration.from_pretrained('./checkpoint-3060')
  File "/usr/local/lib/python3.7/dist-packages/transformers/modeling_utils.py", line 1934, in from_pretrained
    **kwargs,
  File "/usr/local/lib/python3.7/dist-packages/transformers/configuration_utils.py", line 526, in from_pretrained
    config_dict, kwargs = cls.get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/transformers/configuration_utils.py", line 553, in get_config_dict
    config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/transformers/configuration_utils.py", line 614, in _get_config_dict
    f"{pretrained_model_name_or_path} is not a local folder and is not a valid model identifier listed on "
OSError: ./checkpoint-3060 is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo with `use_auth_token` or log in with `huggingface-cli login` and pass ``use_auth_token=True
@Nealcly
Copy link
Owner

Nealcly commented Jul 12, 2022

It seems that you set a non-local folder as the cached path.

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