Skip to content

Commit

Permalink
Update pytorch_lightning/callbacks/model_checkpoint.py
Browse files Browse the repository at this point in the history
Co-authored-by: ananthsub <ananth.subramaniam@gmail.com>
  • Loading branch information
SeanNaren and ananthsub committed Oct 24, 2020
1 parent a1e0e1f commit b4d33d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/callbacks/model_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def save_checkpoint(self, trainer, pl_module):
# Mode 2: save the last checkpoint
self._save_last_checkpoint(trainer, pl_module, epoch, monitor_candidates, filepath)

def _sync_best_model_across_procs(self, trainer):
def _sync_best_model_across_procs(self, trainer) -> None:
if trainer.accelerator_backend and torch_distrib.is_initialized():
best_model_path, best_model_score = trainer.accelerator_backend.broadcast((self.best_model_path,
self.best_model_score))
Expand Down

0 comments on commit b4d33d3

Please sign in to comment.