Skip to content

Improve download error messages #477

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

Merged

Conversation

GregoryComer
Copy link
Member

@GregoryComer GregoryComer commented Apr 25, 2024

Improve CLI error messages when user has not logged in via huggingface-cli login or needs to request access to a model through HuggingFace. Also add common issues section to README.

When missing the CLI login, output looks like this:

Downloading mistralai/Mistral-7B-Instruct-v0.2 from HuggingFace...
Access denied. Create a HuggingFace account and run 'pip3 install huggingface_hub' and 'huggingface-cli login' to authenticate.

When the user needs to request access to the model, output looks like this:

Downloading mistralai/Mistral-7B-Instruct-v0.2 from HuggingFace...
403 Client Error. (Request ID: Root=1-6629a4c2-4c457124529cc04b0164f042;d1e1e6a2-8c8c-4e24-8147-8144fd97cfd1)

Cannot access gated repo for url https://huggingface.co/api/models/mistralai/Mistral-7B-Instruct-v0.2/revision/main.
Access to model mistralai/Mistral-7B-Instruct-v0.2 is restricted and you are not in the authorized list. Visit https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2 to ask for access.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Apr 25, 2024
@GregoryComer GregoryComer force-pushed the improve-download-error-messages branch from cebcad5 to 6b1f508 Compare April 25, 2024 00:53
@GregoryComer GregoryComer marked this pull request as ready for review April 25, 2024 00:55
@GregoryComer GregoryComer requested a review from byjlw April 25, 2024 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants