From f1011526503a5f617c1ff7350482bd670ac92c00 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 3 Jul 2019 18:14:34 -0400 Subject: [PATCH] checkpoint only on rank=0 now --- pytorch_lightning/models/trainer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytorch_lightning/models/trainer.py b/pytorch_lightning/models/trainer.py index 60ce23f1..21f0541d 100644 --- a/pytorch_lightning/models/trainer.py +++ b/pytorch_lightning/models/trainer.py @@ -588,4 +588,5 @@ class Trainer(TrainerIO): # model checkpointing print('save callback...') - self.checkpoint_callback.on_epoch_end(epoch=self.current_epoch, logs=self.__tng_tqdm_dic) + if self.proc_rank == 0: + self.checkpoint_callback.on_epoch_end(epoch=self.current_epoch, logs=self.__tng_tqdm_dic)