composer.profiler.system_profiler#
Profiler to record system level metrics.
Classes
The SystemProfiler records system level metrics. |
- class composer.profiler.system_profiler.SystemProfiler(profile_cpu=True, profile_memory=False, profile_disk=False, profile_net=False, stats_thread_interval_seconds=0.5)[source]#
Bases:
composer.core.callback.Callback
The SystemProfiler records system level metrics. Implemented as a
Callback
, the profiler forks a thread duringEvent.INIT
which polls and records system state.When used with the Composer
Trainer
, the system profiler is enabled if profiling is enabled.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
.- Parameters
profile_cpu (bool) โ Whether to record cpu statistics (Default:
True
)profile_memory (bool) โ Whether to record memory statistics (Default:
False
)profile_disk (bool) โ Whether to record disk I/O statistics (Default:
False
)profile_net (bool) โ Whether to record network I/O statistics (Default:
False
)stats_thread_interval_seconds (float) โ Interval to record system-level stats, in seconds. (Default: every
0.5
seconds)