show progressbar only on progress_rank 0 on ddp_slurm (#4437)

Co-authored-by: chaton <thomas@grid.ai>
Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
This commit is contained in:
cool425589 2020-11-06 08:36:22 +08:00 committed by GitHub
parent 9c8701f2e2
commit 5e09fd31e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class DDPSLURMAccelerator(Accelerator):
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