Skip to content

Commit b26e5f6

Browse files
Typo fix: on_training_epoch_end -> on_train_epoch_end (#17110)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 88c0d4d commit b26e5f6

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/source-pytorch/common/lightning_module.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ Train Epoch-level Operations
226226
============================
227227

228228
In the case that you need to make use of all the outputs from each :meth:`~lightning.pytorch.LightningModule.training_step`,
229-
override the :meth:`~lightning.pytorch.LightningModule.on_training_epoch_end` method.
229+
override the :meth:`~lightning.pytorch.LightningModule.on_train_epoch_end` method.
230230

231231
.. code-block:: python
232232

docs/source-pytorch/upgrade/sections/1_4_regular.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Ref
88

99
* - relied on the ``outputs`` in your ``LightningModule.on_train_epoch_end`` or ``Callback.on_train_epoch_end`` hooks
10-
- rely on either ``on_training_epoch_end`` or set outputs as attributes in your ``LightningModule`` instances and access them from the hook
10+
- rely on either ``on_train_epoch_end`` or set outputs as attributes in your ``LightningModule`` instances and access them from the hook
1111
- #7339
1212

1313
* - accessed ``Trainer.truncated_bptt_steps``

docs/source-pytorch/upgrade/sections/1_9_advanced.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
- #16748
1616

1717
* - implemented ``LightningModule.training_epoch_end`` hooks
18-
- port your logic to ``LightningModule.on_training_epoch_end`` hook
18+
- port your logic to ``LightningModule.on_train_epoch_end`` hook
1919
- #16520
2020

2121
* - implemented ``LightningModule.validation_epoch_end`` hook

tests/tests_pytorch/trainer/logging_/test_eval_loop_logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def training_step(self, batch, batch_idx):
597597
self.log("batch_idx", value, on_step=True, on_epoch=True, prog_bar=True)
598598
return out
599599

600-
def on_training_epoch_end(self):
600+
def on_train_epoch_end(self):
601601
metrics = self.trainer.progress_bar_metrics
602602
v = 15 if self.current_epoch == 0 else 150
603603
assert metrics["batch_idx_epoch"] == (v / 5.0)

0 commit comments

Comments
 (0)