profiler¶
- torchtune.utils.profiler(enabled: Optional[bool] = False, output_dir: Optional[str] = './torchtune_perf_tracing.json') ContextManager [source]¶
Utility component that wraps around torch.profiler to profile model’s operators. See https://pytorch.org/docs/stable/profiler.html for more details. The schedule for this profiler is wait 100 steps, warmup 5 steps, trace 5 steps Note: Enabling pytorch profiler may have training speed reduction.