-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
import pytorch_lightning
fails with ValueError: transformers.models.auto.__spec__ is None
#11524
Comments
It seems to happen with A quick workaround is to not use
|
Thanks! It is solved now. |
Let's keep this issue open until it gets fixed :) |
`torchmetrics` 0.7.0 released yesterday (Jan 17th 2022) is causing an issue with pytorch_lightning: Lightning-AI/pytorch-lightning#11524
`torchmetrics` 0.7.0 released yesterday (Jan 17th 2022) is causing an issue with pytorch_lightning: Lightning-AI/pytorch-lightning#11524
import pytorch_lightning
fails with ValueError: transformers.models.auto.__spec__ is None
exact same issue exact same diagnostic with install as of yesterday 22/01/2022 20h51 GMT+1 |
🐛 Bug
A ValueError occurs whenever PyTorch Lightning is imported after Huggingface's Transformer. Importing Transformer after PyTorch does not lead to any errors, however.
To Reproduce
Tested in local anaconda environment:
import this:
It seems that this issue doesn't exist on Google Colab.
Expected behavior
Environment
- GPU:
- TITAN X (Pascal)
- TITAN X (Pascal)
- TITAN X (Pascal)
- TITAN X (Pascal)
- available: True
- version: 10.1
- numpy: 1.22.1
- pyTorch_debug: False
- pyTorch_version: 1.8.1+cu101
- pytorch-lightning: 1.5.8
- tqdm: 4.61.2
- transformers: 4.15.0
- OS: Linux
- architecture:
- 64bit
- ELF
- processor: x86_64
- python: 3.9.5
- version: Rename variables #124-Ubuntu SMP Fri Nov 10 18:29:59 UTC 2017
Additional context
The text was updated successfully, but these errors were encountered: