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

ImportError: cannot import name 'HfApi' from 'huggingface_hub' #1889

Closed
baberabb opened this issue May 25, 2024 · 2 comments
Closed

ImportError: cannot import name 'HfApi' from 'huggingface_hub' #1889

baberabb opened this issue May 25, 2024 · 2 comments
Assignees

Comments

@baberabb
Copy link
Contributor

baberabb commented May 25, 2024

The main script fails to run for me with this import error. Tried on 3.11 and 3.12 and also with a new environment. Full traceback below:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "../lm-evaluation-harness/lm_eval/__main__.py", line 3, in <module>
    import logging
  File "../lm-evaluation-harness/lm_eval/logging/__init__.py", line 1, in <module>
    from .evaluation_tracker import EvaluationTracker
  File "../lm-evaluation-harness/lm_eval/logging/evaluation_tracker.py", line 8, in <module>
    from huggingface_hub import HfApi
ImportError: cannot import name 'HfApi' from 'huggingface_hub' (../lm-evaluation-harness/.venv2/lib/python3.11/site-packages/huggingface_hub/__init__.py)

huggingface-hub==0.23.1

@haileyschoelkopf haileyschoelkopf self-assigned this May 25, 2024
@haileyschoelkopf
Copy link
Contributor

Does #1858 fix your issue by chance?

@baberabb
Copy link
Contributor Author

Does #1858 fix your issue by chance?

yup working! closing the issue.

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

No branches or pull requests

2 participants