We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82d7717 commit c1c2f86Copy full SHA for c1c2f86
src/lightning/pytorch/trainer/trainer.py
@@ -264,6 +264,14 @@ def __init__(
264
profiler: To profile individual steps during training and assist in identifying bottlenecks.
265
Default: ``None``.
266
267
+ .. note::
268
+ Do **not** use a manual ``torch.profiler.profile`` context manager around
269
+ ``Trainer.fit()``, ``Trainer.validate()``, etc.
270
+ This will lead to internal errors and cryptic crashes due to incompatibility between
271
+ PyTorch Profiler and Lightning's training loop.
272
+ Always use this ``profiler`` argument to enable profiling in Lightning.
273
+
274
275
detect_anomaly: Enable anomaly detection for the autograd engine.
276
Default: ``False``.
277
0 commit comments