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

FIX Honor HF_HUB_OFFLINE mode if set by user #1454

Merged

Conversation

BenjaminBossan
Copy link
Member

Resolves #1452

If users enable offline mode, don't perform checks for files on HF Hub, as they would fail.

Resolves huggingface#1452

If users enable offline mode, don't perform checks for files on HF Hub,
as they would fail.
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@pacman100 pacman100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @BenjaminBossan!

@pacman100
Copy link
Contributor

However, this won't handle the timeout scenarios like the recent one, right?

@BenjaminBossan
Copy link
Member Author

However, this won't handle the timeout scenarios like the recent one, right?

No, I don't think so. We could try to add that by including the corresponding exception. Do you know which one that is?

@pacman100
Copy link
Contributor

pacman100 commented Feb 12, 2024

https://github.com/huggingface/huggingface_hub/blob/main/src%2Fhuggingface_hub%2Futils%2F_errors.py#L234

BadRequestError I think. As this inherits from HfHubHTTPError, the current PR should handle it.

@pacman100 pacman100 merged commit 6e95381 into huggingface:main Feb 12, 2024
14 checks passed
@BenjaminBossan BenjaminBossan deleted the fix-honor-hf-offline-mode branch February 12, 2024 13:50
@powerjohnnyli

This comment was marked as duplicate.

@edamamez
Copy link

Do we know when this will be included in a release?

@BenjaminBossan
Copy link
Member Author

Do we know when this will be included in a release?

We're finishing up a last few PRs, after that we should be ready for a release. We aim for this week.

BenjaminBossan added a commit to BenjaminBossan/peft that referenced this pull request Mar 14, 2024
Resolves huggingface#1452

If users enable offline mode, don't perform checks for files on HF Hub,
as they would fail.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

peft/utils/save_and_load.py try to connect to the hub even when HF_HUB_OFFLINE=1
5 participants