Update trainer.py (#233)

This commit is contained in:
William Falcon
2019-09-19 08:23:48 -04:00
committed by GitHub
parent 2a1bc22f42
commit 87708157bc
+4 -6
View File
@@ -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