Skip to content

Commit c59df13

Browse files
committed
Fixes #2455
1 parent 4492804 commit c59df13

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pytorch_lightning/callbacks/early_stopping.py

+2
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ def _run_early_stopping_check(self, trainer, pl_module):
151151
# check flag across all GPUs
152152
should_stop = torch.tensor(int(should_stop), device=pl_module.device)
153153
if trainer.use_ddp or trainer.use_ddp2:
154+
print(f'RANK: {trainer.global_rank} REDUCING...')
154155
dist.all_reduce(should_stop, op=dist.reduce_op.MAX)
156+
print(f'RANK: {trainer.global_rank} REDUCED...')
155157
dist.barrier()
156158

157159
print(f'RANK: {trainer.global_rank} SHOULD STOP: {should_stop} BEST: {self.best_score}')

0 commit comments

Comments
 (0)