SimpleProfiler¶
- class pytorch_lightning.profiler.SimpleProfiler(dirpath=None, filename=None, extended=True)[source]¶
Bases:
pytorch_lightning.profiler.base.BaseProfilerThis 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.
- Parameters
dirpath¶ (
Union[str,Path,None]) – Directory path for thefilename. IfdirpathisNonebutfilenameis present, thetrainer.log_dir(fromTensorBoardLogger) will be used.filename¶ (
Optional[str]) – If present, filename where the profiler results will be saved instead of printing to stdout. The.txtextension will be used automatically.
- Raises
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.