Skip to content

Clean printing to terminal alongside progress bar #5275

@juneskiafc

Description

@juneskiafc

🚀 Feature

A way to print to terminal without breaking up the progress bar.

Motivation

A lot of people print stuff to terminal while training/validating/testing, and currently a simple call to print() will break the progress bar. A way to get around this is to set up a custom progress bar, with methods for calling tqdm.write, and passing that as a callback to the trainer. However, this feels like a lot of effort for just getting clean terminal output alongside the progress bar.

Pitch

Ability to get the ProgressBar - or the current active tqdm instance (main_progress_bar, val_progres_bar, etc) - through the Trainer or the LightningModule.
Something like pbar = trainer.pbar would feel intuitive.
Then, the user can call pbar.write(), and get clean printing like tqdm.write().

Metadata

Metadata

Assignees

Labels

featureIs an improvement or enhancementgood first issueGood for newcomershelp wantedOpen to be worked on

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions