Skip to content

Commit 55c375b

Browse files
christopherfishlexierule
authored andcommitted
Remove call to deprecated fit_loop (#8873)
1 parent 13f15fa commit 55c375b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pytorch_lightning/callbacks/model_checkpoint.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ def on_train_end(self, trainer: "pl.Trainer", pl_module: "pl.LightningModule") -
334334
rank_zero_info("Saving latest checkpoint...")
335335
# as we advance one step at end of training, we use `global_step - 1` to avoid saving duplicates
336336
monitor_candidates = self._monitor_candidates(trainer, trainer.current_epoch, trainer.global_step - 1)
337-
trainer.train_loop.global_step -= 1
337+
trainer.fit_loop.global_step -= 1
338338
self._save_last_checkpoint(trainer, monitor_candidates)
339-
trainer.train_loop.global_step += 1
339+
trainer.fit_loop.global_step += 1
340340

341341
def on_save_checkpoint(
342342
self, trainer: "pl.Trainer", pl_module: "pl.LightningModule", checkpoint: Dict[str, Any]

0 commit comments

Comments
 (0)