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' #18146

Closed
fu-hanghang opened this issue Jul 24, 2023 · 1 comment · Fixed by #18178
Labels
docs Documentation related question Further information is requested ver: 1.6.x

Comments

@fu-hanghang
Copy link

fu-hanghang commented Jul 24, 2023

Bug description

Hello, when I try to train a model, I failed to import 'ProgressBarBase', the message shows below:
Traceback (most recent call last): File "D:\LoFTR-master\train.py", line 8, in <module> import pytorch_lightning as pl File "C:\Users\Administrator\.conda\envs\patch\lib\site-packages\pytorch_lightning\__init__.py", line 21, in <module> from pytorch_lightning.callbacks import Callback # noqa: E402 File "C:\Users\Administrator\.conda\envs\patch\lib\site-packages\pytorch_lightning\callbacks\__init__.py", line 23, in <module> from pytorch_lightning.callbacks.progress import ProgressBar, ProgressBarBase ImportError: cannot import name 'ProgressBarBase' from 'pytorch_lightning.callbacks.progress' (C:\Users\Administrator\.conda\envs\patch\lib\site-packages\pytorch_lightning\callbacks\progress\__init__.py)
I tried both update to the newest version and to 1.3.5 version,none of them works.
Which really confused me for a long time, please help me, tks.

What version are you seeing the problem on?

v1.6, v2.0

How to reproduce the bug

No response

Error messages and logs

# Error messages and logs here please

Environment

Current environment
#- Lightning Component (e.g. Trainer, LightningModule, LightningApp, LightningWork, LightningFlow):
#- PyTorch Lightning Version (e.g., 1.5.0):
#- Lightning App Version (e.g., 0.5.2):
#- PyTorch Version (e.g., 2.0):
#- Python version (e.g., 3.9):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):
#- Running environment of LightningApp (e.g. local, cloud):

More info

No response

cc @Borda

@fu-hanghang fu-hanghang added bug Something isn't working needs triage Waiting to be triaged by maintainers labels Jul 24, 2023
@awaelchli awaelchli added question Further information is requested and removed bug Something isn't working needs triage Waiting to be triaged by maintainers labels Jul 27, 2023
@awaelchli
Copy link
Contributor

awaelchli commented Jul 27, 2023

Hey @fu-hanghang
The ProgressBarBase got renamed to ProgressBar in Lightning 2.0 #11908

The correct import is:

from pytorch_lightning.callbacks.progress import ProgressBar 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related question Further information is requested ver: 1.6.x
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants