Skip to content

Commit

Permalink
Fix Checkpoint issue when using Horovod distributed backend (PyTorchL…
Browse files Browse the repository at this point in the history
…ightning#6947)

Co-Authored-By: Adrian Wälchli <[email protected]>
  • Loading branch information
liob and awaelchli committed Apr 11, 2021
1 parent fe0d088 commit f10b2a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pytorch_lightning/plugins/training_type/horovod.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def reduce(self, tensor, group: Optional[Any] = None, reduce_op: Optional[Union[

if reduce_op in (None, "avg", "mean"):
reduce_op = hvd.Average
elif reduce_op == "sum":
elif reduce_op in ("sum", ReduceOp.SUM):
reduce_op = hvd.Sum
else:
raise ValueError(f"unrecognized `reduce_op`: {reduce_op}")
Expand Down

0 comments on commit f10b2a4

Please sign in to comment.