"no-token" is passed to `huggingface_hub` when token is `None`
See original GitHub issueDescribe the bug
In the 2 lines listed below, a token is passed to huggingface_hub
to get information from a dataset. If no token is provided, a “no-token” string is passed. What is the purpose of it ? If no real, I would prefer if the None
value could be sent directly to be handle by huggingface_hub
. I feel that here it is working because we assume the token will never be validated.
https://github.com/huggingface/datasets/blob/5b23f58535f14cc4dd7649485bce1ccc836e7bca/src/datasets/load.py#L753 https://github.com/huggingface/datasets/blob/5b23f58535f14cc4dd7649485bce1ccc836e7bca/src/datasets/load.py#L1121
Expected results
Pass token=None
to huggingface_hub
.
Actual results
token="no-token"
is passed.
Environment info
huggingface_hub v0.10.0dev
Issue Analytics
- State:
- Created a year ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How to login to Huggingface Hub with Access Token - Beginners
I simply want to login to Huggingface HUB using an access token. I signed up, read the card, accepted its terms by checking...
Read more >How to fix no token found error while downloading hugging ...
use generate token from https://huggingface.co/settings/tokens and past it. install python lib huggingface_hub pip install huggingface_hub ...
Read more >Code To Align Annotations With Huggingface Tokenizers
This post demonstrates an end to end implementation of token alignment and ... if token_ix is not None: # White spaces have no...
Read more >huggingface-hub Changelog - pyup.io
Now possible to login with a hardcoded token (non-blocking) ... `token` parameter can now be passed to every method in `huggingface_hub`.
Read more >huggingface-hub - PyPI
Client library to download and publish models, datasets and other repos on the huggingface.co hub.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @Wauplin, thanks for the warning about the deprecation of
token
in favor ofuse_auth_token
.Indeed, in datasets we use internally
use_auth_token
, which in this case was transformed totoken
to callHfApi.dataset_info
: https://github.com/huggingface/datasets/blob/1a9385d7cc8a3241b44015145ef56a230fdadc51/src/datasets/load.py#L747Therefore, for the new hfh release, the fix will be trivial: we will pass directly
use_auth_token
.As discussed during our meeting yesterday, due to the fact that at datasets we support multiple hfh versions, I think we should handle passing
token
oruse_auth_token
depending on the hfh version.As soon as
token
is deprecated and hfh has a new release, we’ll updatedatasets
to use the new argument instead. Does it sound good to you ?