Skip to content

Commit 6c3dfc7

Browse files
committed
Merge branch 'fix/enabling-multiple-checkpoints-mlflow' of https://github.com/HarryAnkers/pytorch-lightning into fix/enabling-multiple-checkpoints-mlflow
2 parents 9b315f1 + 2539866 commit 6c3dfc7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/lightning/pytorch/loggers/mlflow.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -331,9 +331,8 @@ def after_save_checkpoint(self, checkpoint_callback: ModelCheckpoint) -> None:
331331
# log checkpoints as artifacts
332332
if self._log_model == "all" or self._log_model is True and checkpoint_callback.save_top_k == -1:
333333
self._scan_and_log_checkpoints(checkpoint_callback)
334-
elif self._log_model is True:
335-
if checkpoint_callback not in self._checkpoint_callbacks:
336-
self._checkpoint_callbacks.append(checkpoint_callback)
334+
elif self._log_model is True and checkpoint_callback not in self._checkpoint_callbacks:
335+
self._checkpoint_callbacks.append(checkpoint_callback)
337336

338337
def _scan_and_log_checkpoints(self, checkpoint_callback: ModelCheckpoint) -> None:
339338
# get checkpoints to be saved with associated score

0 commit comments

Comments
 (0)