Closed henrywoo closed 7 months ago
You might want to use a Hugging Face token with write permissions instead of just a token with read permissions. You can refer to: https://huggingface.co/docs/hub/security-tokens
$huggingface-cli login --token $HF_TOKEN_REDWOOD
Token will not been saved to git credential helper. Pass `add_to_git_credential=True` if you want to set the git credential as well.
Token is valid (permission: write).
Your token has been saved to /home/hellcat/.cache/huggingface/token
Login successful
Then I still got:
$python chatbot.py
/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/bitsandbytes/cextension.py:34: UserWarning: The installed version of bitsandbytes was compiled without GPU support. 8-bit optimizers, 8-bit multiplication, and GPU quantization are unavailable.
warn("The installed version of bitsandbytes was compiled without GPU support. "
/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cpu.so: undefined symbol: cadam32bit_grad_fp32
Traceback (most recent call last):
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status
response.raise_for_status()
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/api/repos/create
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 3178, in create_repo
hf_raise_for_status(r)
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 333, in hf_raise_for_status
raise HfHubHTTPError(str(e), response=response) from e
huggingface_hub.utils._errors.HfHubHTTPError: 403 Client Error: Forbidden for url: https://huggingface.co/api/repos/create (Request ID: Root=1-65df6a10-33579ae56032e4cc528ebbaa;10b7feca-a671-4a62-8aaa-f90275c0a404)
You don't have the rights to create a dataset under this namespace
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 286, in hf_raise_for_status
response.raise_for_status()
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/datasets/opencodeinterpreter_user_data
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/media/hellcat/dataext4/OpenCodeInterpreter/demo/chatbot.py", line 34, in <module>
scheduler = CommitScheduler(
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/_commit_scheduler.py", line 117, in __init__
repo_url = self.api.create_repo(repo_id=repo_id, private=private, repo_type=repo_type, exist_ok=True)
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 3186, in create_repo
self.repo_info(repo_id=repo_id, repo_type=repo_type, token=token)
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2275, in repo_info
return method(
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2148, in dataset_info
hf_raise_for_status(r)
File "/home/hellcat/miniconda3/envs/codellm/lib/python3.10/site-packages/huggingface_hub/utils/_errors.py", line 323, in hf_raise_for_status
raise RepositoryNotFoundError(message, response) from e
huggingface_hub.utils._errors.RepositoryNotFoundError: 404 Client Error. (Request ID: Root=1-65df6a10-568bea6e0dc084ca31493ab6;64a44af2-ccd2-40c2-b5c8-d0fe009392b9)
Repository Not Found for url: https://huggingface.co/api/datasets/opencodeinterpreter_user_data.
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.
We attempted to reproduce the error you mentioned by replacing the token with write permissions with one that only has read permissions. Are you using a token with write permissions in export HF_TOKEN="your huggingface access token"?
It is weird but it is working now after a reboot.
Good to know it's working now after the reboot. If you run into any more hiccups, feel free to reach out.
I am running the chatbot code but got this error:
how to fix it?