File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1818import pytest
1919
2020from pytorch_lightning import Callback , Trainer
21+ from pytorch_lightning .callbacks import ModelCheckpoint
2122from pytorch_lightning .loggers import WandbLogger
2223from tests .helpers import BoringModel
2324from tests .helpers .utils import no_warning_call
@@ -68,3 +69,9 @@ def on_save_checkpoint(self, *args):
6869 trainer .callbacks = [NewSignature (), ValidSignature1 (), ValidSignature2 ()]
6970 with no_warning_call (DeprecationWarning ):
7071 trainer .save_checkpoint (filepath )
72+
73+ def test_v1_5_0_model_checkpoint_period (tmpdir ):
74+ with no_warning_call (DeprecationWarning ):
75+ ModelCheckpoint (dirpath = tmpdir )
76+ with pytest .deprecated_call (match = "is deprecated in v1.3 and will be removed in v1.5" ):
77+ ModelCheckpoint (dirpath = tmpdir , period = 1 )
You can’t perform that action at this time.
0 commit comments