peft
peft copied to clipboard
loftq_utils.py depdends on huggingface_hub.errors, which doesn't appear in some versions of huggingface_hub
System Info
loftq_utils.py refers to huggingface_hub.errors
Should the requirements.txt include huggingface_hub?
I have huggingface_hub version 0.19.4 and it does not have huggingface_hub.errors.
Is there a workaround or another version of huggingface_hub?
Who can help?
No response
Information
- [X] The official example scripts
- [ ] My own modified scripts
Tasks
- [ ] An officially supported task in the
examplesfolder - [X] My own task or dataset (give details below)
Reproduction
Should the requirements.txt include huggingface_hub?
I have huggingface_hub version 0.19.4 and it does not have huggingface_hub.errors.
Is there a workaround or another version of huggingface_hub?
Expected behavior
Should the requirements.txt include huggingface_hub?
I have huggingface_hub version 0.19.4 and it does not have huggingface_hub.errors.
Is there a workaround or another version of huggingface_hub?
It's true that we don't explicitly list huggingface_hub as a requirement, but it's an indirect requirement (e.g. it's a requirement of accelerate which is a requirement of PEFT). For your specific problem, I think it can easily be solved if the error is imported from huggingface_hub.utils instead. I tested this locally with v0.19.4 and it worked. Would you like to create a PR for this?
I'm also getting ModuleNotFoundError: No module named 'huggingface_hub.errors' when importing from peft import AutoPeftModelForCausalLM.
Tried on a new env with python 3.10 and pip install transformers peft. Not sure how to fix this.
Yeah, it's the same issue most likely, with the fix I mentioned above. What version of huggingface_hub are you using? Could you try downgrading it?
I upgraded transformers and xformers and one of them helped to fix the issue.