Shortcuts

SimpleProfiler

class lightning.pytorch.profilers.SimpleProfiler(dirpath=None, filename=None, extended=True)[소스]

기반 클래스: lightning.pytorch.profilers.profiler.Profiler

This profiler simply records the duration of actions (in seconds) and reports the mean duration of each action and the total time spent over the entire training run.

매개변수
  • dirpath (Union[str, Path, None]) – Directory path for the filename. If dirpath is None but filename is present, the trainer.log_dir (from TensorBoardLogger) will be used.

  • filename (Optional[str]) – If present, filename where the profiler results will be saved instead of printing to stdout. The .txt extension will be used automatically.

  • extended (bool) – If True, adds extra columns representing number of calls and percentage of total time spent on respective action.

예외 발생

ValueError – If you attempt to start an action which has already started, or if you attempt to stop recording an action which was never started.

start(action_name)[소스]

Defines how to start recording an action.

반환 형식

None

stop(action_name)[소스]

Defines how to record the duration once an action is complete.

반환 형식

None