Skip to content

TQDMProgressBar calls tqdm.refresh instead of tqdm.update. #21320

@cf-natali

Description

@cf-natali

Bug description

As of GH-13962, TQDMProgressBar calls tqdm.refresh instead of tqdm.update, explicitly setting n:

    if not bar.disable:
        bar.n = value
        bar.refresh()

However, I believe the proper API is to use update instead.

In particular, this means that things done as part of update like EMAs are not updated, which means that using a custom callback to e.g. pass smoothing to have instantaneous values doesn't work, or more generally it might break things in subtle ways.

cc @ethanwharris @lantiga @awaelchli

What version are you seeing the problem on?

master

Reproduced in studio

No response

How to reproduce the bug

Error messages and logs

# Error messages and logs here please

Environment

Current environment
#- PyTorch Lightning Version (e.g., 2.5.0):
#- PyTorch Version (e.g., 2.5):
#- Python version (e.g., 3.12):
#- OS (e.g., Linux):
#- CUDA/cuDNN version:
#- GPU models and configuration:
#- How you installed Lightning(`conda`, `pip`, source):

More info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions