Skip to content

Commit 26936bb

Browse files
committed
Fixes #2455
1 parent 0f70120 commit 26936bb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pytorch_lightning/callbacks/early_stopping.py

+1
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ def _run_early_stopping_check(self, trainer, pl_module):
152152
if trainer.use_ddp or trainer.use_ddp2:
153153
should_stop = torch.tensor(int(should_stop), device=pl_module.device)
154154
dist.all_reduce(should_stop, op=dist.ReduceOp.MAX)
155+
dist.barrier()
155156

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

0 commit comments

Comments
 (0)