Skip to content

Commit 34053ef

Browse files
authored
Remove deprecated Trainer.running_sanity_check (#9209)
1 parent 65be98b commit 34053ef

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
237237

238238
- Removed deprecated `profiled_functions` argument from `PyTorchProfiler` ([#9178](https://github.com/PyTorchLightning/pytorch-lightning/pull/9178))
239239

240+
241+
- Removed deprecated property `Trainer.running_sanity_check` in favor of `Trainer.sanity_checking` ([#9209](https://github.com/PyTorchLightning/pytorch-lightning/pull/9209))
242+
240243
### Fixed
241244

242245
- Fixed save/load/resume from checkpoint for DeepSpeed Plugin (

pytorch_lightning/trainer/deprecated_api.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,8 @@
1717

1818
class DeprecatedTrainerAttributes:
1919

20-
sanity_checking: bool
2120
fit_loop: FitLoop
2221

23-
@property
24-
def running_sanity_check(self) -> bool:
25-
rank_zero_deprecation(
26-
"`Trainer.running_sanity_check` has been renamed to `Trainer.sanity_checking` and will be removed in v1.5."
27-
)
28-
return self.sanity_checking
29-
3022
@property
3123
def train_loop(self) -> FitLoop:
3224
rank_zero_deprecation(

tests/deprecated_api/test_remove_1-5.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@
2525
from tests.helpers.utils import no_warning_call
2626

2727

28-
def test_v1_5_0_running_sanity_check():
29-
trainer = Trainer()
30-
with pytest.deprecated_call(match="has been renamed to `Trainer.sanity_checking`"):
31-
assert not trainer.running_sanity_check
32-
33-
3428
def test_v1_5_0_model_checkpoint_period(tmpdir):
3529
with no_warning_call(DeprecationWarning):
3630
ModelCheckpoint(dirpath=tmpdir)

0 commit comments

Comments
 (0)