Skip to content

Commit b37b58a

Browse files
liobawaelchli
andauthored
Fix Checkpoint issue when using Horovod distributed backend (PyTorchLightning#6947) (#6958)
Co-Authored-By: Adrian Wälchli <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]>
1 parent da1ac3a commit b37b58a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytorch_lightning/plugins/training_type/horovod.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def reduce(self, tensor, group: Optional[Any] = None, reduce_op: Optional[Union[
150150

151151
if reduce_op in (None, "avg", "mean"):
152152
reduce_op = hvd.Average
153-
elif reduce_op == "sum":
153+
elif reduce_op in ("sum", ReduceOp.SUM):
154154
reduce_op = hvd.Sum
155155
else:
156156
raise ValueError(f"unrecognized `reduce_op`: {reduce_op}")

0 commit comments

Comments
 (0)