diff --git a/CHANGELOG.md b/CHANGELOG.md index 0082201aa1cf9..87ecfdef4d448 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -113,6 +113,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Removed deprecated `utilities.distributed.rank_zero_{warn/deprecation}` ([#10451](https://github.com/PyTorchLightning/pytorch-lightning/pull/10451)) +- Removed deprecated `Trainer.train_loop` property in favor of `Trainer.fit_loop` ([#10482](https://github.com/PyTorchLightning/pytorch-lightning/pull/10482)) + + ### Fixed - Fixed an issue where class or init-only variables of dataclasses were passed to the dataclass constructor in `utilities.apply_to_collection` ([#9702](https://github.com/PyTorchLightning/pytorch-lightning/issues/9702)) diff --git a/docs/source/common/lightning_module.rst b/docs/source/common/lightning_module.rst index 77a2c719736be..166b0b2384461 100644 --- a/docs/source/common/lightning_module.rst +++ b/docs/source/common/lightning_module.rst @@ -1167,14 +1167,14 @@ for more information. on_train_start() for epoch in epochs: - train_loop() + fit_loop() on_train_end() on_fit_end() teardown("fit") - def train_loop(): + def fit_loop(): on_epoch_start() on_train_epoch_start() diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py index b6dfcbfee8bc6..396289000251d 100644 --- a/pytorch_lightning/trainer/trainer.py +++ b/pytorch_lightning/trainer/trainer.py @@ -2134,13 +2134,6 @@ def __getstate__(self): def __setstate__(self, state): self.__dict__ = state - @property - def train_loop(self) -> FitLoop: - rank_zero_deprecation( - "`Trainer.train_loop` has been renamed to `Trainer.fit_loop` and will be removed in v1.6." - ) - return self.fit_loop - @property def terminate_on_nan(self) -> bool: rank_zero_deprecation("`Trainer.terminate_on_nan` is deprecated in v1.5 and will be removed in 1.7.") diff --git a/tests/deprecated_api/test_remove_1-6.py b/tests/deprecated_api/test_remove_1-6.py index 686339df6317c..066922c8f4d16 100644 --- a/tests/deprecated_api/test_remove_1-6.py +++ b/tests/deprecated_api/test_remove_1-6.py @@ -69,14 +69,6 @@ def test_v1_6_0_is_overridden_model(): assert not is_overridden("foo", model=model) -def test_v1_6_0_train_loop(tmpdir): - trainer = Trainer() - with pytest.deprecated_call( - match=r"`Trainer.train_loop` has been renamed to `Trainer.fit_loop` and will be removed in v1.6." - ): - _ = trainer.train_loop - - def test_v1_6_0_deprecated_model_summary_mode(tmpdir): model = BoringModel() with pytest.deprecated_call(match="Argument `mode` in `ModelSummary` is deprecated in v1.4"):