ignite icon indicating copy to clipboard operation
ignite copied to clipboard

Feature Request: Option to disable automatic epoch display in ProgressBar

Open SpandanBhoiIITM opened this issue 8 months ago • 4 comments

Problem

Currently ignite.handlers.ProgressBar automatically appends epoch information like [epoch/max_epochs] to the description when max_epochs > 1.

Example:

Training [1/4] Training [2/4]

This behavior can make it difficult to align multiple progress bars (e.g. trainer and evaluator) or customize the display layout.

Current Workaround

Users can redefine the entire bar_format, but this requires rewriting the full format string even if they only want to remove the epoch display.

Also, removing {desc} from bar_format disables the dynamic desc argument from tqdm.

Proposed Solution

Allow users to control how the description is formatted.

Possible approaches:

  1. show_epoch boolean flag
  2. description_format parameter

Example:

ProgressBar(desc="Training", show_epoch=False)

SpandanBhoiIITM avatar Mar 08 '26 06:03 SpandanBhoiIITM

Cool issue, man. I read #3628, but I wasn't able to understand the use case for this. Why would one need to remove the [epoch/max_epoch] if ProgressBar can be used for better alignment?

ChandraguptSharma07 avatar Mar 08 '26 09:03 ChandraguptSharma07

One possible use case is when users already display epoch information elsewhere in their training loop (for example, logging Epoch 3/10 before running the progress bar). In that case, showing [epoch/max_epochs] again in the progress bar can become redundant.

Some users may also prefer a cleaner progress bar display or want more control over how the description is formatted without rewriting the entire bar_format.

SpandanBhoiIITM avatar Mar 09 '26 07:03 SpandanBhoiIITM

Hi, I'd like to work on this. I'll submit a PR shortly using the show_epoch boolean flag approach.

nightcityblade avatar Mar 10 '26 16:03 nightcityblade

@nightcityblade there is already a PR on that, but we discuss the usefulness of the feature. Do not submit anything before the green light, your PR will be most likely closed.

Some users may also prefer a cleaner progress bar display or want more control over how the description is formatted without rewriting the entire bar_format.

Unfortunately, this does not look like a real need to me.

vfdev-5 avatar Mar 10 '26 21:03 vfdev-5