composer.profiler.dataloader_profiler#
Profiler to measure the time it takes the data loader to return a batch.
Classes
Records the time it takes the data loader to return a batch. |
- class composer.profiler.dataloader_profiler.DataLoaderProfiler[source]#
Bases:
composer.core.callback.Callback
Records the time it takes the data loader to return a batch.
When used with the Composer
Trainer
, the data loader profiler is enabled if profiling is enabled.Works by wrapping the original training and evaluation data loaders and uses the
Marker
API to record the latency of the wrapped data loader.The profiler is implemented as a
Callback
and accesses the training and evaluation data loaders throughState
.Note
The Composer
Trainer
creates an instance ofTorchProfiler
whentensorboard_trace_handler_dir
is provided. The user should not create and directly register an instance ofTorchProfiler
when using the ComposerTrainer
.