ProgressBarLogger#

class composer.loggers.ProgressBarLogger(stream=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, log_traces=False)[source]#

Log metrics to the console and optionally show a progress bar.

Note

This logger is automatically instantiated by the trainer via the progress_bar, and console_stream options. This logger does not need to be created manually.

TQDM is used to display progress bars.

During training, the progress bar logs the batch and training loss. During validation, the progress bar logs the batch and validation accuracy.

Example progress bar output:

Epoch 1: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 64/64 [00:01<00:00, 53.17it/s, loss/train=2.3023]
Epoch 1 (val): 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 20/20 [00:00<00:00, 100.96it/s, accuracy/val=0.0995]
Parameters
  • stream (str | TextIO, optional) โ€“ The console stream to use. If a string, it can either be 'stdout' or 'stderr'. (default: sys.stderr)

  • log_traces (bool) โ€“ Whether to log traces or not. (default: False)