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

🐛 ModuleNotFoundError: No module named 'huggingface_hub.errors' #121

Open
xingluzheshuai opened this issue Nov 7, 2024 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@xingluzheshuai
Copy link

xingluzheshuai commented Nov 7, 2024

  1. I want to use my own dataset to train and test a DER model,how should i do?
  2. I use the DEC python file in\torch-uncertainty-main\auto_tutorials_source\tutorial_evidential_classification.py

How to solve this problem?
here's the problem:

Traceback (most recent call last):
  File "D:\wxh\torch-uncertainty-main\torch-uncertainty-main\auto_tutorials_source\tutorial_evidential_classification.py", line 33, in <module>
    from torch_uncertainty import TUTrainer
  File "D:\wxh\torch-uncertainty-main\torch-uncertainty-main\torch_uncertainty\__init__.py", line 2, in <module>
    from .utils import TULightningCLI, TUTrainer
  File "D:\wxh\torch-uncertainty-main\torch-uncertainty-main\torch_uncertainty\utils\__init__.py", line 4, in <module>
    from .hub import load_hf
  File "D:\wxh\torch-uncertainty-main\torch-uncertainty-main\torch_uncertainty\utils\hub.py", line 6, in <module>
    from huggingface_hub.errors import EntryNotFoundError
ModuleNotFoundError: No module named 'huggingface_hub.errors'

We do the pip list in virtual environment, the version of huggingface_hub is 0.20.1

@o-laurent
Copy link
Contributor

o-laurent commented Nov 7, 2024

Hello @xingluzheshuai,

Updating the huggingface_hub library (the current version is 0.26.2) should solve the problem. This dependency is in pre-release, and they just changed the location of the error in their library, hence the bug.

For DER, you can have a look at this tutorial: https://torch-uncertainty.github.io/auto_tutorials/tutorial_der_cubic.html#sphx-glr-auto-tutorials-tutorial-der-cubic-py

Let us know if you have problems with DER and have a great day!

@o-laurent o-laurent changed the title ModuleNotFoundError: No module named 'huggingface_hub.errors' 🐛 ModuleNotFoundError: No module named 'huggingface_hub.errors' Nov 7, 2024
@o-laurent o-laurent self-assigned this Nov 7, 2024
@o-laurent o-laurent added the question Further information is requested label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants