Skip to content

Commit 44bf493

Browse files
committed
fix docs
1 parent d6ecc30 commit 44bf493

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/source-pytorch/common/early_stopping.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ Additional parameters that stop training at extreme points:
7272
- ``check_on_train_epoch_end``: When turned on, it checks the metric at the end of a training epoch. Use this only when you are monitoring any metric logged within
7373
training-specific hooks on epoch-level.
7474

75-
**Accessing Stopping Reason**
75+
After training completes, you can programmatically check why early stopping occurred using the ``stopping_reason``
76+
attribute, which returns an ``EarlyStoppingReason`` enum value.
7677

77-
After training completes, you can programmatically check why early stopping occurred using the ``stopping_reason`` attribute, which returns an ``EarlyStoppingReason`` enum value.
78-
79-
.. testcode::
78+
.. code-block:: python
8079
8180
from lightning.pytorch.callbacks import EarlyStopping
8281
from lightning.pytorch.callbacks.early_stopping import EarlyStoppingReason

0 commit comments

Comments
 (0)