Skip to content

Commit e7ad151

Browse files
NeoKishcarmocca
andauthored
Remove the deprecated trainer.verbose_evaluate (#14884)
Co-authored-by: Carlos Mocholí <[email protected]>
1 parent a648934 commit e7ad151

File tree

3 files changed

+5
-29
lines changed

3 files changed

+5
-29
lines changed

src/pytorch_lightning/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
226226

227227
- Removed the deprecated `SimpleProfiler.profile_iterable` and `AdvancedProfiler.profile_iterable` attributes ([#14864](https://github.com/Lightning-AI/lightning/pull/14864))
228228

229+
230+
- Removed the deprecated `Trainer.verbose_evaluate` ([#14884](https://github.com/Lightning-AI/lightning/pull/14884))
231+
232+
229233
- Remove the deprecated `Trainer.should_rank_save_checkpoint` ([#14885](https://github.com/Lightning-AI/lightning/pull/14885))
230234

235+
231236
### Fixed
232237

233238
- 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))

src/pytorch_lightning/trainer/trainer.py

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2228,26 +2228,6 @@ def predict_loop(self, loop: PredictionLoop):
22282228
loop.trainer = self
22292229
self._predict_loop = loop
22302230

2231-
@property
2232-
def verbose_evaluate(self) -> bool:
2233-
rank_zero_deprecation(
2234-
"The `Trainer.verbose_evaluate` property has been deprecated and will be removed in v1.8. The current value"
2235-
" returned is the union of the validate and test loop values. You can choose which one to access with"
2236-
" `trainer.{validate,test}_loop.verbose`.",
2237-
stacklevel=5,
2238-
)
2239-
return self.validate_loop.verbose or self.test_loop.verbose
2240-
2241-
@verbose_evaluate.setter
2242-
def verbose_evaluate(self, verbose: bool) -> None:
2243-
rank_zero_deprecation(
2244-
"The `Trainer.verbose_evaluate` property has been deprecated and will be removed in v1.8. This will set"
2245-
" the value for both trainer.{validate,test}_loop.verbose`.",
2246-
stacklevel=5,
2247-
)
2248-
self.validate_loop.verbose = verbose
2249-
self.test_loop.verbose = verbose
2250-
22512231
@property
22522232
def _evaluation_loop(self) -> EvaluationLoop:
22532233
if self.state.fn in (TrainerFn.FITTING, TrainerFn.TUNING):

tests/tests_pytorch/deprecated_api/test_remove_1-8.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,6 @@ def test_v1_8_0_deprecated_call_hook():
6565
trainer.call_hook("test_hook")
6666

6767

68-
def test_v1_8_0_trainer_verbose_evaluate():
69-
trainer = Trainer()
70-
with pytest.deprecated_call(match="verbose_evaluate` property has been deprecated and will be removed in v1.8"):
71-
assert trainer.verbose_evaluate
72-
73-
with pytest.deprecated_call(match="verbose_evaluate` property has been deprecated and will be removed in v1.8"):
74-
trainer.verbose_evaluate = False
75-
76-
7768
@pytest.mark.parametrize("fn_prefix", ["validated", "tested", "predicted"])
7869
def test_v1_8_0_trainer_ckpt_path_attributes(fn_prefix: str):
7970
test_attr = f"{fn_prefix}_ckpt_path"

0 commit comments

Comments
 (0)