composer.profiler.profiler_hparams#
Hyperparameter classes for the profiler
.
- composer.profiler.profiler_hparams.trace_handler_registry#
Trace handler registry.
- Type
Dict[str, Type[TraceHandlerHparams]]
- composer.profiler.profiler_hparams.profiler_scheduler_registry#
Profiler scheduler registry.
- Type
Dict[str, Type[ProfileScheduleHparams]]
Hparams
These classes are used with yahp
for YAML
-based configuration.
Hyperparameters for the |
|
Hyperparameters for the |
|
Base class for Composer Profiler schedule hparams. |
|
Hyperparameters for the |
|
Base class for the |
Attributes
- class composer.profiler.profiler_hparams.CyclicProfilerScheduleHparams(skip_first=0, wait=0, warmup=1, active=4, repeat=1)[source]#
Bases:
composer.profiler.profiler_hparams.ProfileScheduleHparams
Hyperparameters for the
cyclic_schedule()
.- Parameters
skip_first (int, optional) โ See
cyclic_schedule()
.wait (str, optional) โ See
cyclic_schedule()
.warmup (str, optional) โ See
cyclic_schedule()
.active (str, optional) โ See
cyclic_schedule()
.repeat (str, optional) โ See
cyclic_schedule()
.
- class composer.profiler.profiler_hparams.JSONTraceHparams(folder='{run_name}/traces', filename='ep{epoch}-ba{batch}-rank{rank}.json', artifact_name='{run_name}/traces/ep{epoch}-ba{batch}-rank{rank}.json', merged_trace_filename='node{node_rank}.json', merged_trace_artifact_name='{run_name}/traces/merged_trace.json', overwrite=False, num_traces_to_keep=- 1)[source]#
Bases:
composer.profiler.profiler_hparams.TraceHandlerHparams
Hyperparameters for the
JSONTraceHandler
.- Parameters
folder (str, optional) โ See
JSONTraceHandler
.filename (str, optional) โ See
JSONTraceHandler
.artifact_name (str, optional) โ See
JSONTraceHandler
.merged_trace_filename (str, optional) โ See
JSONTraceHandler
.merged_trace_artifact_name (str, optional) โ See
JSONTraceHandler
.overwrite (bool, optional) โ See
JSONTraceHandler
.num_traces_to_keep (int, optional) โ See
JSONTraceHandler
.
- class composer.profiler.profiler_hparams.ProfileScheduleHparams[source]#
Bases:
yahp.hparams.Hparams
,abc.ABC
Base class for Composer Profiler schedule hparams.
- class composer.profiler.profiler_hparams.ProfilerHparams(prof_schedule, prof_trace_handlers, sys_prof_cpu=True, sys_prof_memory=False, sys_prof_disk=False, sys_prof_net=False, sys_prof_stats_thread_interval_seconds=0.5, torch_prof_folder='{run_name}/torch_traces', torch_prof_filename='rank{rank}.{batch}.pt.trace.json', torch_prof_artifact_name='{run_name}/torch_traces/rank{rank}.{batch}.pt.trace.json', torch_prof_overwrite=False, torch_prof_use_gzip=False, torch_prof_record_shapes=False, torch_prof_profile_memory=False, torch_prof_with_stack=False, torch_prof_with_flops=False, torch_prof_num_traces_to_keep=- 1)[source]#
Bases:
yahp.hparams.Hparams
Hyperparameters for the
Profiler
.- Parameters
prof_schedule (ProfileScheduleHparams) โ Profile schedule hparams.
prof_trace_handlers (List[TraceHandlerHparams]) โ See
Profiler
.sys_prof_stats_thread_interval_seconds (float, optional) โ See
Profiler
.torch_prof_folder (str, optional) โ See
TorchProfiler
.torch_prof_filename (str, optional) โ See
TorchProfiler
.torch_prof_artifact_name (str, optional) โ See
TorchProfiler
.torch_prof_overwrite (bool, optional) โ See
TorchProfiler
.torch_prof_use_gzip (bool, optional) โ See
TorchProfiler
.torch_prof_record_shapes (bool, optional) โ See
TorchProfiler
.torch_prof_profile_memory (bool, optional) โ See
TorchProfiler
.torch_prof_with_stack (bool, optional) โ See
TorchProfiler
.torch_prof_with_flops (bool, optional) โ See
TorchProfiler
.torch_prof_num_traces_to_keep (int, optional) โ See
TorchProfiler
.
- class composer.profiler.profiler_hparams.TraceHandlerHparams[source]#
Bases:
yahp.hparams.Hparams
,abc.ABC
Base class for the
TraceHandler
hparams.- abstract initialize_object()[source]#
Constructs and returns an instance of a
TraceHandler
.- Returns
TraceHandler โ The trace handler.