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

Doest work on colab - ImportError: cannot import name 'cached_path' from 'transformers.file_utils' (/usr/local/lib/python3.8/dist-packages/transformers/file_utils.py) #1

Closed
Diyago opened this issue Dec 10, 2022 · 1 comment

Comments

@Diyago
Copy link

Diyago commented Dec 10, 2022

%pip install ruprompts
import ruprompts

from transformers import pipeline


---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
[<ipython-input-2-c349a1a8aeb4>](https://localhost:8080/#) in <module>
----> 1 import ruprompts
      2 
      3 from transformers import pipeline

2 frames
[/usr/local/lib/python3.8/dist-packages/ruprompts/prompt.py](https://localhost:8080/#) in <module>
      7 from torch import nn
      8 from transformers import AutoModel, AutoTokenizer, PreTrainedModel, PreTrainedTokenizerBase
----> 9 from transformers.file_utils import PushToHubMixin, cached_path, hf_bucket_url
     10 from typeguard import typechecked
     11 

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

---------------------------------------------------------------------------
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.

To view examples of installing some common dependencies, click the
"Open Examples" button below.
---------------------------------------------------------------------------
@konodyuk
Copy link
Collaborator

Fixed in 0.1.4

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