Skip to content

Commit 0d5bb43

Browse files
committed
Update model_checkpoint.py
1 parent f7f2ce4 commit 0d5bb43

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pytorch_lightning/callbacks/model_checkpoint.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ def on_train_batch_end(self, trainer, pl_module, outputs, batch, batch_idx, data
209209
if self._should_skip_saving_checkpoint(trainer):
210210
return
211211
step = trainer.global_step
212-
skip_batch = self.every_n_batches < 1 or ((step + 1) % self.every_n_batches != 0)
213-
log.warning(f"in on_train_batch_end at step {step}, every_n_batches={self.every_n_batches}, going to skip batch? {skip_batch}")
212+
skip_batch = self.every_n_steps < 1 or ((step + 1) % self.every_n_steps != 0)
214213
if skip_batch:
215214
return
216215
self.save_checkpoint(trainer, pl_module)

0 commit comments

Comments
 (0)