Skip to content

Commit

Permalink
Remove deprecated disable_validation property from Trainer
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikb11 committed Nov 12, 2021
1 parent fa0ed17 commit 6a741c2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
9 changes: 0 additions & 9 deletions pytorch_lightning/trainer/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1781,15 +1781,6 @@ def _should_reload_dl_epoch(self) -> bool:
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."""
Expand Down
6 changes: 0 additions & 6 deletions tests/deprecated_api/test_remove_1-6.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,6 @@ def test_v1_6_0_deprecated_model_summary_mode(tmpdir):
model.summarize(mode="top")


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


def test_v1_6_0_deprecated_hpc_load(tmpdir):
model = BoringModel()
trainer = Trainer(default_root_dir=tmpdir, max_steps=1)
Expand Down

0 comments on commit 6a741c2

Please sign in to comment.