Fix Checkpoint issue when using Horovod distributed backend (PyTorchLightning#6947) (#6958)

Co-Authored-By: Adrian Wälchli <aedu.waelchli@gmail.com>

Co-authored-by: Adrian Wälchli <aedu.waelchli@gmail.com>
This commit is contained in:
Hinrich B. Winther 2021-04-13 11:18:52 +02:00 committed by GitHub
parent da1ac3a530
commit b37b58a73e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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}")