skip best_model_path if checkpoint_callback is None (#2962)

* skip best_model_path if checkpoint_callback is None

* removed test
This commit is contained in:
Lezwon Castelino 2020-10-01 16:27:26 +05:30 committed by GitHub
parent e4e60e9b82
commit 8be002ccc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -67,7 +67,8 @@ class TPUBackend(Accelerator):
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