浏览代码

hotfix: replace StepControl.can_modify with began_allreduce

This PR fixes an edge case: previously, DecentralizedAverager would not set began_allreduce correctly when actually running all-reduce. It had mistakenly set can_modify=False instead of the actual property began_allreduce=True.
justheuristic 3 年之前
父节点
当前提交
7c4d13f06d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      hivemind/averaging/control.py

+ 1 - 1
hivemind/averaging/control.py

@@ -103,7 +103,7 @@ class StepControl(MPFuture):
     @stage.setter
     def stage(self, stage: AveragingStage):
         if stage == AveragingStage.RUNNING_ALLREDUCE:
-            self.can_modify = False
+            self.began_allreduce = True
         self._shared_buffer[StepControl._STAGE] = stage.value
 
     @property