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 'hf_bucket_url' from 'transformers.file_utils' #22390

Closed
4 tasks
Andy824 opened this issue Mar 27, 2023 · 2 comments
Closed
4 tasks

Comments

@Andy824
Copy link

Andy824 commented Mar 27, 2023

System Info

from transformers.file_utils import default_cache_path, hf_bucket_url
I want to import hf_bucket_url on Colab, but I got the error
"ImportError: cannot import name 'hf_bucket_url' from 'transformers.file_utils' (/usr/local/lib/python3.9/dist-packages/transformers/file_utils.py)"

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

ImportError: cannot import name 'hf_bucket_url' from 'transformers.file_utils' (/usr/local/lib/python3.9/dist-packages/transformers/file_utils.py)

Expected behavior

Please tell me am I doing something wrong?

@sgugger
Copy link
Collaborator

sgugger commented Mar 27, 2023

Yes, this function was removed several versions ago. It was only relevant for downloading files before the model Hub was properly setup. You should now use the huggingface_hub library to manage downloads of models from the Hub.

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

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