From 7e52f6ea97519137afbaac9a6193119cf8b899fa Mon Sep 17 00:00:00 2001 From: William Falcon Date: Thu, 25 Jul 2019 17:14:33 -0400 Subject: [PATCH] cleaned up some if statements --- pytorch_lightning/models/trainer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/models/trainer.py b/pytorch_lightning/models/trainer.py index 3ee2b222..a667c25c 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -885,6 +885,6 @@ class Trainer(TrainerIO): self.prog_bar.set_postfix(**tqdm_metrics) # model checkpointing - if self.proc_rank == 0 and self.checkpoint_callback: + if self.proc_rank == 0 and self.checkpoint_callback is not None: print('save callback...') self.checkpoint_callback.on_epoch_end(epoch=self.current_epoch, logs=self.__tng_tqdm_dic)