At least you got past 2.2. I got the following error at the first cell of 2.2:
HTTPError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/huggingface_hub/utils/_errors.py in hf_raise_for_status(response, endpoint_name)
258 try:
→ 259 response.raise_for_status()
260 except HTTPError as e:
/opt/conda/lib/python3.7/site-packages/requests/models.py in raise_for_status(self)
1020 if http_error_msg:
→ 1021 raise HTTPError(http_error_msg, response=self)
1022
HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/facebook/roberta-hate-speech-dynabench-r4-target/resolve/main/tokenizer_config.json
The above exception was the direct cause of the following exception:
RepositoryNotFoundError Traceback (most recent call last)
/opt/conda/lib/python3.7/site-packages/transformers/utils/hub.py in cached_file(path_or_repo_id, filename, cache_dir, force_download, resume_download, proxies, use_auth_token, revision, local_files_only, subfolder, user_agent, _raise_exceptions_for_missing_entries, _raise_exceptions_for_connection_errors, _commit_hash)
419 use_auth_token=use_auth_token,
→ 420 local_files_only=local_files_only,
421 )
/opt/conda/lib/python3.7/site-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs)
117
→ 118 return fn(*args, **kwargs)
119
/opt/conda/lib/python3.7/site-packages/huggingface_hub/file_download.py in hf_hub_download(repo_id, filename, subfolder, repo_type, revision, library_name, library_version, cache_dir, local_dir, local_dir_use_symlinks, user_agent, force_download, force_filename, proxies, etag_timeout, resume_download, token, local_files_only, legacy_cache_layout)
1198 proxies=proxies,
→ 1199 timeout=etag_timeout,
1200 )
/opt/conda/lib/python3.7/site-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs)
117
→ 118 return fn(*args, **kwargs)
119
/opt/conda/lib/python3.7/site-packages/huggingface_hub/file_download.py in get_hf_file_metadata(url, token, proxies, timeout)
1540 )
→ 1541 hf_raise_for_status(r)
1542
/opt/conda/lib/python3.7/site-packages/huggingface_hub/utils/_errors.py in hf_raise_for_status(response, endpoint_name)
290 )
→ 291 raise RepositoryNotFoundError(message, response) from e
292
RepositoryNotFoundError: 401 Client Error. (Request ID: Root=1-64a08c7f-187f4b363b1132414e3fc3df)
Repository Not Found for url: https://huggingface.co/facebook/roberta-hate-speech-dynabench-r4-target/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:
OSError Traceback (most recent call last)
in
1 toxicity_model_name = “facebook/roberta-hate-speech-dynabench-r4-target”
----> 2 toxicity_tokenizer = AutoTokenizer.from_pretrained(toxicity_model_name, device_map=“auto”)
3 toxicity_model = AutoModelForSequenceClassification.from_pretrained(toxicity_model_name, device_map=“auto”)
4 print(toxicity_model.config.id2label)
/opt/conda/lib/python3.7/site-packages/transformers/models/auto/tokenization_auto.py in from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwargs)
617
618 # Next, let’s try to use the tokenizer_config file to get the tokenizer class.
→ 619 tokenizer_config = get_tokenizer_config(pretrained_model_name_or_path, **kwargs)
620 if “_commit_hash” in tokenizer_config:
621 kwargs[“_commit_hash”] = tokenizer_config[“_commit_hash”]
/opt/conda/lib/python3.7/site-packages/transformers/models/auto/tokenization_auto.py in get_tokenizer_config(pretrained_model_name_or_path, cache_dir, force_download, resume_download, proxies, use_auth_token, revision, local_files_only, subfolder, **kwargs)
474 _raise_exceptions_for_missing_entries=False,
475 _raise_exceptions_for_connection_errors=False,
→ 476 _commit_hash=commit_hash,
477 )
478 if resolved_config_file is None:
/opt/conda/lib/python3.7/site-packages/transformers/utils/hub.py in cached_file(path_or_repo_id, filename, cache_dir, force_download, resume_download, proxies, use_auth_token, revision, local_files_only, subfolder, user_agent, _raise_exceptions_for_missing_entries, _raise_exceptions_for_connection_errors, _commit_hash)
423 except RepositoryNotFoundError:
424 raise EnvironmentError(
→ 425 f"{path_or_repo_id} is not a local folder and is not a valid model identifier "
426 "listed on ‘Models - Hugging Face’\nIf this is a private repository, make sure to "
427 "pass a token having permission to this repo with use_auth_token
or log in with "
OSError: facebook/roberta-hate-speech-dynabench-r4-target is not a local folder and is not a valid model identifier listed on ‘Models - Hugging Face’
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
.
Hopefully this issue will be resolved shortly so I’ll have the chance to finish this Lab.