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

only validate hf user token on rank 0 #2408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

winglian
Copy link
Collaborator

When training with multi-node, it's easy to hit rate limits, this ensures that we only check the token on rank 0 which should be sufficient to fail the process if it is found to be invalid.

[rank3]: Traceback (most recent call last):                                                                                                                                                                                                    [rank3]:   File "/root/miniconda3/envs/py3.11/lib/python3.11/site-packages/huggingface_hub/hf_api.py", line 1639, in whoami                                                                                                                    
[rank3]:     hf_raise_for_status(r)                                                                                                                                                                                                            [rank3]:   File "/root/miniconda3/envs/py3.11/lib/python3.11/site-packages/huggingface_hub/utils/_http.py", line 477, in hf_raise_for_status                                                                                                   
[rank3]:     raise _format(HfHubHTTPError, str(e), response) from e                                                                                                                                                                            [rank3]: huggingface_hub.errors.HfHubHTTPError: 504 Server Error: Gateway Time-out for url: https://huggingface.co/api/whoami-v2      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants