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: Import location of HF hub errors #2178

Conversation

BenjaminBossan
Copy link
Member

Resolves #2097

This fix should make the import of the huggingface_hub error work with older versions of that package.

Resolves huggingface#2097

This fix should make the import of the huggingface_hub error work with
older versions of that package.
@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.

@Wauplin
Copy link
Contributor

Wauplin commented Oct 25, 2024

Hey, thanks for the ping. Importing from huggingface_hub.errors is supposed to be more future-proof. The solution in this PR works but I'd recommend to bump the minimal version of huggingface_hub instead in

peft/setup.py

Line 70 in 28a5ba1

"huggingface_hub>=0.17.0",

Setting the version as >=0.25.0 should work (see here)

Also set min version to 0.25.0
@BenjaminBossan
Copy link
Member Author

Thanks @Wauplin. I was unsure what the best way to import would be in the future. I now switched to importing from huggingface_hub.errors. Is v0.25.0 the lowest possible version for this to work or can we go lower to be as flexible as possible with the requirements?

Copy link
Contributor

@Wauplin Wauplin left a comment

Choose a reason for hiding this comment

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

Thanks for the update @BenjaminBossan!
Yes 0.25.0 is the lowest possible release that supports it.

@BenjaminBossan BenjaminBossan merged commit b3176ef into huggingface:main Oct 28, 2024
14 checks passed
@BenjaminBossan BenjaminBossan deleted the fix-import-location-of-errors-hf-hub branch October 28, 2024 10:49
yaswanth19 pushed a commit to yaswanth19/peft that referenced this pull request Oct 29, 2024
Resolves huggingface#2097

Import errors from huggingface_hub.errors

Also set min version to 0.25.0
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.

loftq_utils.py depdends on huggingface_hub.errors, which doesn't appear in some versions of huggingface_hub
3 participants