starcoder icon indicating copy to clipboard operation
starcoder copied to clipboard

error

Open Eddisont12 opened this issue 1 year ago • 4 comments

(venv) PS D:\Python project\venv> python starcoder.py Traceback (most recent call last): File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\utils_errors.py", line 259, in hf_raise_for_status response.raise_for_status() File "C:\WINDOWS\system32\venv\Lib\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/bigcode/starcoder/resolve/main/tokenizer_config.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\utils\hub.py", line 409, in cached_file resolved_file = hf_hub_download( ^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 120, in _inner_fn return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\file_download.py", line 1166, in hf_hub_download metadata = get_hf_file_metadata( ^^^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 120, in _inner_fn return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\file_download.py", line 1507, in get_hf_file_metadata hf_raise_for_status(r) File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\utils_errors.py", line 291, in hf_raise_for_status raise RepositoryNotFoundError(message, response) from e huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-64543c9b-38c8826659eb2e211b453be8)

Repository Not Found for url: https://huggingface.co/bigcode/starcoder/resolve/main/tokenizer_config.json. Please make sure you specified the correct repo_id and repo_type. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Python project\venv\starcoder.py", line 6, in tokenizer = AutoTokenizer.from_pretrained(checkpoint) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\models\auto\tokenization_auto.py", line 642, in from_pretrained tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\models\auto\tokenization_auto.py", line 486, in get_tokenizer_config resolved_config_file = cached_file( ^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\utils\hub.py", line 424, in cached_file raise EnvironmentError( OSError: bigcode/starcoder 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. (venv) PS D:\Python project\venv> python starcoder.py Traceback (most recent call last): File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\utils_errors.py", line 259, in hf_raise_for_status response.raise_for_status() File "C:\WINDOWS\system32\venv\Lib\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/bigcode/starcoder/resolve/main/config.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\utils\hub.py", line 409, in cached_file resolved_file = hf_hub_download( ^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 120, in _inner_fn return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\file_download.py", line 1166, in hf_hub_download metadata = get_hf_file_metadata( ^^^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\utils_validators.py", line 120, in _inner_fn return fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\file_download.py", line 1507, in get_hf_file_metadata hf_raise_for_status(r) File "C:\WINDOWS\system32\venv\Lib\site-packages\huggingface_hub\utils_errors.py", line 291, in hf_raise_for_status raise RepositoryNotFoundError(message, response) from e huggingface_hub.utils._errors.RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-64543d48-024479d8123941844694a131)

Repository Not Found for url: https://huggingface.co/bigcode/starcoder/resolve/main/config.json. Please make sure you specified the correct repo_id and repo_type. If you are trying to access a private or gated repo, make sure you are authenticated. Invalid username or password.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "D:\Python project\venv\starcoder.py", line 4, in model = AutoModelForCausalLM.from_pretrained(model_ckpt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\models\auto\auto_factory.py", line 441, in from_pretrained config, kwargs = AutoConfig.from_pretrained( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\models\auto\configuration_auto.py", line 916, in from_pretrained config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\configuration_utils.py", line 573, in get_config_dict config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\configuration_utils.py", line 628, in _get_config_dict resolved_config_file = cached_file( ^^^^^^^^^^^^ File "C:\WINDOWS\system32\venv\Lib\site-packages\transformers\utils\hub.py", line 424, in cached_file raise EnvironmentError( OSError: bigcode/starcoder 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.

Eddisont12 avatar May 04 '23 23:05 Eddisont12

You must agree to the agreement in the ‘file and version’ section at https://huggingface.co/bigcode/starcoder, and then log in using the huggingface-cli and set ‘use_auth_token=True’, or set ‘use_auth_token=your huggingface api token’ directly.

2435043xia avatar May 05 '23 06:05 2435043xia

Yes, good point, maybe you can add a disclaimer to the README @ArmelRandy

lvwerra avatar May 05 '23 08:05 lvwerra

@lvwerra Done.

ArmelRandy avatar May 05 '23 09:05 ArmelRandy

@Eddisont12 can you confirm that this solves the issue?

lvwerra avatar May 07 '23 14:05 lvwerra

closing as issue is inactive

loubnabnl avatar Jun 13 '23 08:06 loubnabnl