From 290998d8384cc32ab795048af1ae727c15e1e2a1 Mon Sep 17 00:00:00 2001 From: cool425589 Date: Fri, 6 Nov 2020 08:36:22 +0800 Subject: [PATCH] show progressbar only on progress_rank 0 on ddp_slurm (#4437) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: chaton Co-authored-by: Adrian Wälchli --- pytorch_lightning/accelerators/ddp_slurm_accelerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/accelerators/ddp_slurm_accelerator.py b/pytorch_lightning/accelerators/ddp_slurm_accelerator.py index 4960445edd27d6..1ea4461c3c3cc2 100644 --- a/pytorch_lightning/accelerators/ddp_slurm_accelerator.py +++ b/pytorch_lightning/accelerators/ddp_slurm_accelerator.py @@ -123,7 +123,7 @@ def ddp_train(self, process_idx, model): self.set_world_ranks(process_idx) # toggle prog bar - if self.trainer.global_rank == 0 and self.trainer.progress_bar_callback is not None: + if self.trainer.global_rank != 0 and self.trainer.progress_bar_callback is not None: self.trainer.progress_bar_callback.disable() # set warning rank