소스 검색

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