提交 4161c03b 编写于 作者: M mapingshuo

add is_strict_auto

上级 419fee27
...@@ -626,6 +626,7 @@ class DistributedStrategy(object): ...@@ -626,6 +626,7 @@ class DistributedStrategy(object):
return self.strategy.zero return self.strategy.zero
@zero.setter @zero.setter
@is_strict_auto
def zero(self, flag): def zero(self, flag):
if isinstance(flag, bool): if isinstance(flag, bool):
self.strategy.zero = flag self.strategy.zero = flag
...@@ -640,6 +641,7 @@ class DistributedStrategy(object): ...@@ -640,6 +641,7 @@ class DistributedStrategy(object):
return get_msg_dict(self.strategy.zero_configs) return get_msg_dict(self.strategy.zero_configs)
@zero_configs.setter @zero_configs.setter
@is_strict_auto
def zero_configs(self, configs): def zero_configs(self, configs):
check_configs_key(self.strategy.zero_configs, configs, "zero_configs") check_configs_key(self.strategy.zero_configs, configs, "zero_configs")
assign_configs_value(self.strategy.zero_configs, configs) assign_configs_value(self.strategy.zero_configs, configs)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册