From 87708157bc1c8f69ccfe5401b75d227348f56dfe Mon Sep 17 00:00:00 2001 From: William Falcon Date: Thu, 19 Sep 2019 08:23:48 -0400 Subject: [PATCH] Update trainer.py (#233) --- pytorch_lightning/trainer/trainer.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pytorch_lightning/trainer/trainer.py b/pytorch_lightning/trainer/trainer.py index 7d658d4c57..a01bae69b6 100644 --- a/pytorch_lightning/trainer/trainer.py +++ b/pytorch_lightning/trainer/trainer.py @@ -767,12 +767,6 @@ class Trainer(TrainerIO): except Exception: self.node_rank = 0 - # recover original exp before went into process - # init in write mode only on proc 0 - if self.experiment is not None: - self.experiment.debug = self.proc_rank > 0 - self.experiment = self.experiment.get_non_ddp_exp() - # show progbar only on prog_rank 0 self.show_progress_bar = self.show_progress_bar and self.node_rank == 0 and gpu_nb == 0 @@ -781,7 +775,11 @@ class Trainer(TrainerIO): self.world_size = self.nb_gpu_nodes * self.num_gpus # let the exp know the rank to avoid overwriting logs + # recover original exp before went into process + # init in write mode only on proc 0 if self.experiment is not None: + self.experiment = self.experiment.get_non_ddp_exp() + self.experiment.debug = self.proc_rank > 0 self.experiment.rank = self.proc_rank # set up server using proc 0's ip address