diff --git a/src/pytorch_lightning/CHANGELOG.md b/src/pytorch_lightning/CHANGELOG.md index e104da285debd..2f7f1ffca6ca3 100644 --- a/src/pytorch_lightning/CHANGELOG.md +++ b/src/pytorch_lightning/CHANGELOG.md @@ -226,8 +226,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Removed the deprecated `SimpleProfiler.profile_iterable` and `AdvancedProfiler.profile_iterable` attributes ([#14864](https://github.com/Lightning-AI/lightning/pull/14864)) + +- Removed the deprecated `Trainer.verbose_evaluate` ([#14884](https://github.com/Lightning-AI/lightning/pull/14884)) + + - Remove the deprecated `Trainer.should_rank_save_checkpoint` ([#14885](https://github.com/Lightning-AI/lightning/pull/14885)) + ### Fixed - Fixed an issue with `LightningLite.setup()` not setting the `.device` attribute correctly on the returned wrapper ([#14822](https://github.com/Lightning-AI/lightning/pull/14822)) diff --git a/src/pytorch_lightning/trainer/trainer.py b/src/pytorch_lightning/trainer/trainer.py index e6952e4fa7f2b..d286f837d85cb 100644 --- a/src/pytorch_lightning/trainer/trainer.py +++ b/src/pytorch_lightning/trainer/trainer.py @@ -2228,26 +2228,6 @@ def predict_loop(self, loop: PredictionLoop): loop.trainer = self self._predict_loop = loop - @property - def verbose_evaluate(self) -> bool: - rank_zero_deprecation( - "The `Trainer.verbose_evaluate` property has been deprecated and will be removed in v1.8. The current value" - " returned is the union of the validate and test loop values. You can choose which one to access with" - " `trainer.{validate,test}_loop.verbose`.", - stacklevel=5, - ) - return self.validate_loop.verbose or self.test_loop.verbose - - @verbose_evaluate.setter - def verbose_evaluate(self, verbose: bool) -> None: - rank_zero_deprecation( - "The `Trainer.verbose_evaluate` property has been deprecated and will be removed in v1.8. This will set" - " the value for both trainer.{validate,test}_loop.verbose`.", - stacklevel=5, - ) - self.validate_loop.verbose = verbose - self.test_loop.verbose = verbose - @property def _evaluation_loop(self) -> EvaluationLoop: if self.state.fn in (TrainerFn.FITTING, TrainerFn.TUNING): diff --git a/tests/tests_pytorch/deprecated_api/test_remove_1-8.py b/tests/tests_pytorch/deprecated_api/test_remove_1-8.py index 9104beb06efaa..862ffc7e9014d 100644 --- a/tests/tests_pytorch/deprecated_api/test_remove_1-8.py +++ b/tests/tests_pytorch/deprecated_api/test_remove_1-8.py @@ -65,15 +65,6 @@ def test_v1_8_0_deprecated_call_hook(): trainer.call_hook("test_hook") -def test_v1_8_0_trainer_verbose_evaluate(): - trainer = Trainer() - with pytest.deprecated_call(match="verbose_evaluate` property has been deprecated and will be removed in v1.8"): - assert trainer.verbose_evaluate - - with pytest.deprecated_call(match="verbose_evaluate` property has been deprecated and will be removed in v1.8"): - trainer.verbose_evaluate = False - - @pytest.mark.parametrize("fn_prefix", ["validated", "tested", "predicted"]) def test_v1_8_0_trainer_ckpt_path_attributes(fn_prefix: str): test_attr = f"{fn_prefix}_ckpt_path"