- class composer.callbacks.SpeedMonitor(window_size=100)#
Logs the training throughput.
The training throughput in terms of number of samples per second is logged on the
Event.BATCH_ENDevent if we have reached the
The wall clock train time is logged on every
The average throughout over an epoch is logged on the
>>> from composer import Trainer >>> from composer.callbacks import SpeedMonitor >>> # constructing trainer object with this callback >>> trainer = Trainer( ... model=model, ... train_dataloader=train_dataloader, ... eval_dataloader=eval_dataloader, ... optimizers=optimizer, ... max_duration='1ep', ... callbacks=[SpeedMonitor(window_size=100)], ... )
The training throughput is logged by the
Loggerto the following keys as described below.
Rolling average (over
window_sizemost recent batches) of the number of samples processed per second
Total elapsed training time
Total elapsed validation time
Total elapsed time (wall_clock/train + wall_clock/val)
window_size (int, optional) – Number of batches to use for a rolling average of throughput. Defaults to 100.