-
Notifications
You must be signed in to change notification settings - Fork 27.3k
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
transformers.__spec__ returning None. Causing downstream import errors #12904
Comments
|
My bad, at the time of error I found this issue on tensorflow/tensorflow#30028, and thought it was the same. After reading this, I somewhat understood the the functionality of |
@sgugger I'm also getting the same error with the latest transformers version (4.9.2) when I'm trying to use torch.hub to load a model that has Before I was using an older version of transformers (3.9.2) that returned a |
After investigating this further, it does seem particular to the Although it does seem that normally python's import system handles
|
How to solve this issue? |
This issue should be solved in |
i tried transformers-4.15.0 and error is still there |
Environment info
transformers
version: Tried on 4.6.1(current default kaggle version)/4.8.1/4.8.2 and 4.9.1Who can help
Information
This is causing downstream import errors, like right now I am not able to import
lightning-flash
properly as it uses__spec__
in order to find the availability oftransformers
.To reproduce
Expected behavior
Properly defined
__spec__
The text was updated successfully, but these errors were encountered: