-
-
Notifications
You must be signed in to change notification settings - Fork 223
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 '_TPU_AVAILABLE' from 'pytorch_lightning.utilities' #200
Comments
I had the same issue on an M1. You can fix it by downgrading
|
@dephraiim Downgrading did not work for me - same error. |
Can confirm this issue on both 0.5.2 and 0.6.0. |
Was able to get past this error by downgrading pytorch_lightning to 1.7.7, still having errors in torch though. |
Uninstalling torch and then reinstalling with version 1.9.0 seems to do the trick:
|
Tried bdunnette's code but it gave an error, something like that pytorch wasn't available among options of pytorch-lighting 1.11.0 through 1.13.0, so I chose 1.11.0 and it seemed to work instead (after running first uninstall line): pip install -qq torch==1.9.0 pytorch-lightning==1.11.0 aitextgen==0.6.0 |
FYI, I had the same error. A downgrade to 0.5.2 did not change behaviour, but a further step back to 0.5.1 worked. This is under pyenv/venv 3.9.15 |
Same issue here. Interestingly I installed the packages with the same command on 2 different machines(Same ubuntu server OS) and only one of them is having this issue. This solved it:
|
None of the above worked for me. Please someone suggest something different |
For any lurkers, @llimllib was kind enough to propose a fix in #202. You can apply the patch locally or For the project maintainers, it might be a good idea to pin your dependencies, particularly the PL one, to avoid issues like this: Line 3 in 7424601
|
Still getting this issue even after pip installing the separate branch 🤔 None of these options worked for me in the finetuning gpt2 colab |
All I had to do was restart my jupyter kernal after installing, then import worked |
The solution of @carmocca worked for me, but only after |
Tested in a colab notebook, with
!pip install aitextgen -q
. Then ranin the next cell, an got this error:
The text was updated successfully, but these errors were encountered: