composer.loggers.tqdm_logger#

Logs metrics to a TQDM progress bar displayed in the terminal.

Classes

TQDMLogger

Logs metrics to a TQDM progress bar displayed in the terminal.

class composer.loggers.tqdm_logger.TQDMLogger(config=None)[source]#

Bases: composer.core.logging.base_backend.LoggerCallback

Logs metrics to a TQDM progress bar displayed in the terminal.

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

Example usage:
from composer.loggers import TQDMLogger
from composer.trainer import Trainer
trainer = Trainer(
    model=model,
    train_dataloader=train_dataloader,
    eval_dataloader=eval_dataloader,
    max_duration="1ep",
    optimizers=[optimizer],
    loggers=[TQDMLogger()]
)

Example 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]

Note

It is currently not possible to show additional metrics. Custom metrics for the TQDM progress bar will be supported in a future version.

Parameters

config (dict or None, optional) โ€“ Trainer configuration. If provided, it is printed to the terminal as YAML.