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

ImportError: cannot import name 'ProgressBarBase' from 'pytorch_lightning.callbacks.progress' #214

Open
dumpsters opened this issue Mar 17, 2023 · 2 comments

Comments

@dumpsters
Copy link

Trying to run this on WSL, did pip3 install aitextgen and using the training code from the repository.
Also commented out line 14 as per 78a0bfd

./train.py                                                                                
Traceback (most recent call last):
  File "/home/user/aitextgen/./train.py", line 3, in <module>
    from aitextgen.TokenDataset import TokenDataset
  File "/home/user/.local/lib/python3.10/site-packages/aitextgen/__init__.py", line 1, in <module>
    from .aitextgen import aitextgen  # noqa
  File "/home/user/.local/lib/python3.10/site-packages/aitextgen/aitextgen.py", line 31, in <module>
    from .train import ATGProgressBar, ATGTransformer
  File "/home/user/.local/lib/python3.10/site-packages/aitextgen/train.py", line 13, in <module>
    from pytorch_lightning.callbacks.progress import ProgressBarBase
ImportError: cannot import name 'ProgressBarBase' from 'pytorch_lightning.callbacks.progress' (/home/user/.local/lib/python3.10/site-packages/pytorch_lightning/callbacks/progress/__init__.py)
@m3t4f1v3
Copy link

rename all instances of ProgressBarBase to ProgressBar in /home/user/.local/lib/python3.10/site-packages/aitextgen/train.py

@scorixear
Copy link

#216 seems like to fix your issue. I had additional erros when running the example (KeyError loss in metrics['loss']).
Its just general problems with the requirements of this project not setting an upper bound for pytorch lightning.
Version 2.0.0 had some breaking changes in Lightning, hence this code is not working

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

3 participants