未验证 提交 9dedafa0 编写于 作者: M mapingshuo 提交者: GitHub

fix strategy, test=develop (#27323)

* fix strategy, test=develop

* fix can_apply
上级 c8e54c5e
......@@ -60,7 +60,7 @@ class StrategyCompiler(StrategyCompilerBase):
def _get_valid_strategy(self, dist_strategy, can_not_apply_optimizer_list):
import copy
valid_strategy = copy.copy(dist_strategy)
valid_strategy = copy.deepcopy(dist_strategy)
invalid_optimizers = []
for candidate in self._meta_optimizer_candidates:
is_valid = False
......
......@@ -38,7 +38,7 @@ class RecomputeOptimizer(MetaOptimizerBase):
list(user_defined_strategy.recompute_configs["checkpoints"]))
def _can_apply(self):
if self.role_maker._is_collective:
if not self.role_maker._is_collective:
return False
if self.user_defined_strategy.recompute == True:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册