Skip to content

Commit

Permalink
skip best_model_path if checkpoint_callback is None (#2962)
Browse files Browse the repository at this point in the history
* skip best_model_path if checkpoint_callback is None

* removed test
  • Loading branch information
lezwon authored Oct 1, 2020
1 parent e4e60e9 commit 8be002c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pytorch_lightning/accelerators/tpu_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def teardown(self):
last_path = self.mp_queue.get()

# transfer back the best path to the trainer
self.trainer.checkpoint_callback.best_model_path = best_path
if self.trainer.checkpoint_callback is not None:
self.trainer.checkpoint_callback.best_model_path = best_path
# todo, pass also bets score

# load last weights
Expand Down

0 comments on commit 8be002c

Please sign in to comment.