File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
tests/tests_pytorch/checkpointing Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1669,27 +1669,27 @@ def val_dataloader(self) -> DataLoader:
16691669
16701670
16711671def test_save_last_without_save_on_train_epoch_and_without_val (tmp_path ):
1672- """Test that save_last=True when save_on_train_epoch_end=False"""
1672+ """Test that save_last=True when save_on_train_epoch_end=False. """
16731673
16741674 # Remove validation methods to reproduce the bug
16751675 model = BoringModel ()
16761676 model .validation_step = None
16771677 model .val_dataloader = None
1678-
1678+
16791679 checkpoint_callback = ModelCheckpoint (
16801680 dirpath = tmp_path ,
16811681 save_last = True ,
16821682 save_on_train_epoch_end = False ,
16831683 )
1684-
1684+
16851685 trainer = Trainer (
16861686 max_epochs = 2 ,
16871687 callbacks = [checkpoint_callback ],
16881688 logger = False ,
16891689 enable_progress_bar = False ,
16901690 )
1691-
1691+
16921692 trainer .fit (model )
1693-
1693+
16941694 # save_last=True should always save last.ckpt
16951695 assert (tmp_path / "last.ckpt" ).exists ()
You can’t perform that action at this time.
0 commit comments