Feature Request: Option to disable automatic epoch display in ProgressBar
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:
show_epochboolean flagdescription_formatparameter
Example:
ProgressBar(desc="Training", show_epoch=False)
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?
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.
Hi, I'd like to work on this. I'll submit a PR shortly using the show_epoch boolean flag approach.
@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.