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

AttributeError: module 'pytorch_lightning.callbacks' has no attribute 'ProgressBarBase'. Did you mean: 'ProgressBar'? #19873

Closed
carusyte opened this issue May 16, 2024 · 1 comment
Labels
progress bar: tqdm question Further information is requested

Comments

@carusyte
Copy link

carusyte commented May 16, 2024

Bug description

I'm trying to add a custom progress bar (basically the intention is to suppress progress bar display completely), but the following error is thrown:

2024-05-16 10:02:14 - [worker tcp://127.0.0.1:40955] - marten.data.etl - ERROR - module 'pytorch_lightning.callbacks' has no attribute 'ProgressBarBase'
Traceback (most recent call last):
  File "/home/jx/git/marten/src/marten/models/worker_func.py", line 381, in log_metrics_for_hyper_params
    _, metrics = train(
                 ^^^^^^
  File "/home/jx/git/marten/src/marten/models/worker_func.py", line 298, in train
    for attempt in Retrying(
  File "/home/jx/.pyenv/versions/3.12.2/envs/venv_3.12.2/lib/python3.12/site-packages/tenacity/__init__.py", line 347, in __iter__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jx/.pyenv/versions/3.12.2/envs/venv_3.12.2/lib/python3.12/site-packages/tenacity/__init__.py", line 314, in iter
    return fut.result()
           ^^^^^^^^^^^^
  File "/home/jx/.pyenv/versions/3.12.2/lib/python3.12/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/home/jx/.pyenv/versions/3.12.2/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/home/jx/git/marten/src/marten/models/worker_func.py", line 305, in train
    m, metrics = _try_fitting(df,
                 ^^^^^^^^^^^^^^^^
  File "/home/jx/git/marten/src/marten/models/worker_func.py", line 252, in _try_fitting
    metrics = m.fit(
              ^^^^^^
  File "/home/jx/.pyenv/versions/3.12.2/envs/venv_3.12.2/lib/python3.12/site-packages/neuralprophet/forecaster.py", line 1085, in fit
    metrics_df = self._train(
                 ^^^^^^^^^^^^
  File "/home/jx/.pyenv/versions/3.12.2/envs/venv_3.12.2/lib/python3.12/site-packages/neuralprophet/forecaster.py", line 2757, in _train
    self.trainer, checkpoint_callback = utils.configure_trainer(
                                        ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jx/.pyenv/versions/3.12.2/envs/venv_3.12.2/lib/python3.12/site-packages/neuralprophet/utils.py", line 961, in configure_trainer
    and any(isinstance(callback, pl.callbacks.ProgressBarBase) for callback in config["callbacks"])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/jx/.pyenv/versions/3.12.2/envs/venv_3.12.2/lib/python3.12/site-packages/neuralprophet/utils.py", line 961, in <genexpr>
    and any(isinstance(callback, pl.callbacks.ProgressBarBase) for callback in config["callbacks"])
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pytorch_lightning.callbacks' has no attribute 'ProgressBarBase'. Did you mean: 'ProgressBar'?

What version are you seeing the problem on?

v2.2

How to reproduce the bug

No response

Error messages and logs

No response

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 @awaelchli

@carusyte carusyte added bug Something isn't working needs triage Waiting to be triaged by maintainers labels May 16, 2024
@awaelchli
Copy link
Contributor

@carusyte From Lightning 1.9 to 2.0, this base class changed the name. It's just called ProgressBar now.

@awaelchli awaelchli added question Further information is requested progress bar: tqdm and removed bug Something isn't working needs triage Waiting to be triaged by maintainers labels Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
progress bar: tqdm question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants