diff --git a/CHANGELOG.md b/CHANGELOG.md index 3281a07ff6..7002d16808 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -127,8 +127,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Removed deprecated `Trainer.train_loop` property in favor of `Trainer.fit_loop` ([#10482](https://github.com/PyTorchLightning/pytorch-lightning/pull/10482)) +- Removed deprecated `disable_validation` property from Trainer ([#10450](https://github.com/PyTorchLightning/pytorch-lightning/pull/10450)) + + - Removed deprecated `CheckpointConnector.hpc_load` property in favor of `CheckpointConnector.restore` ([#10525](https://github.com/PyTorchLightning/pytorch-lightning/pull/10525)) + + ### 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/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py index 5007927aa9..4cbb33c9b4 100644 --- a/pytorch_lightning/trainer/trainer.py +++ b/pytorch_lightning/trainer/trainer.py @@ -1783,15 +1783,6 @@ class Trainer( n_epochs = self.reload_dataloaders_every_n_epochs return n_epochs and (not self.current_epoch % n_epochs) - @property - def disable_validation(self) -> bool: - """Check if validation is disabled during training.""" - rank_zero_deprecation( - "`trainer.disable_validation` is deprecated in v1.4 and will be removed in v1.6." - " Use `not trainer.enable_validation` instead." - ) - return not self.enable_validation - @property def enable_validation(self) -> bool: """Check if we should run validation during training.""" diff --git a/tests/deprecated_api/test_remove_1-6.py b/tests/deprecated_api/test_remove_1-6.py index efb288a623..1ded07734a 100644 --- a/tests/deprecated_api/test_remove_1-6.py +++ b/tests/deprecated_api/test_remove_1-6.py @@ -47,9 +47,3 @@ def test_v1_6_0_reload_dataloaders_every_epoch(tmpdir): [call.val_dataloader()] + [call.train_dataloader(), call.val_dataloader()] * 3 + [call.test_dataloader()] ) assert tracker.mock_calls == expected_sequence - - -def test_v1_6_0_deprecated_disable_validation(): - trainer = Trainer() - with pytest.deprecated_call(match="disable_validation` is deprecated in v1.4"): - _ = trainer.disable_validation