Closed ProfessorQu closed 1 year ago
I had the same issue on an M1.
You can fix it by downgrading aitextgen
pip3 install -q aitextgen==0.5.2
@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:
!pip uninstall -qqy torch torchvision torchtext torchaudio fastai
!pip install -qq torch==1.9.0 pytorch-lightning==1.7.7 aitextgen==0.6.0
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:
pip uninstall -qqy torch torchvision torchtext torchaudio fastai
pip install -qq torch==1.11.0 pytorch-lightning==1.7.7 aitextgen==0.6.0
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 pip install git+https://github.com/llimllib/aitextgen@fix_tpu_available
until a maintainer merges the PR (at your own discretion).
For the project maintainers, it might be a good idea to pin your dependencies, particularly the PL one, to avoid issues like this: https://github.com/minimaxir/aitextgen/blob/74246011141ce947b4d01044b266df0456e1250c/requirements.txt#L3
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 pip uninstall aitextgen
first.
Tested in a colab notebook, with
!pip install aitextgen -q
. Then ranin the next cell, an got this error: