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

Update deprecated method #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Update deprecated method #6

wants to merge 1 commit into from

Conversation

dendec
Copy link

@dendec dendec commented Nov 10, 2024

Problem:
import of imgbeddings fails with an error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/denis/.pyenv/versions/torch/lib/python3.10/site-packages/imgbeddings/__init__.py", line 1, in <module>
    from .imgbeddings import imgbeddings  # noqa
  File "/home/denis/.pyenv/versions/torch/lib/python3.10/site-packages/imgbeddings/imgbeddings.py", line 7, in <module>
    from huggingface_hub import hf_hub_url, cached_download
ImportError: cannot import name 'cached_download' from 'huggingface_hub' (/home/denis/.pyenv/versions/torch/lib/python3.10/site-packages/huggingface_hub/__init__.py)

Reason:
Method cached_download was removed from huggingface_hub since version 0.26: huggingface/huggingface_hub#2579

Solution:
Use hf_hub_download instead of cached_download

@technology-maen
Copy link

if only the maintainer was active

@fedot
Copy link

fedot commented Nov 28, 2024

The issue is not the removal of cached_download method from huggingface_hub, but the fact that it is not listed on install_requires in setup.py.

This PR is good!
👀🤞 Hope it could be merged by the repo owner.

It would be absolutely amazing to also have dependencies listed in setup.py.

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.

3 participants