diff --git a/pytorch_lightning/plugins/training_type/horovod.py b/pytorch_lightning/plugins/training_type/horovod.py index 8d0add27cb..415de21aca 100644 --- a/pytorch_lightning/plugins/training_type/horovod.py +++ b/pytorch_lightning/plugins/training_type/horovod.py @@ -150,7 +150,7 @@ class HorovodPlugin(ParallelPlugin): 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}")