From 4161c03bbad5ea7aa3b886e6131f2ea7207abd33 Mon Sep 17 00:00:00 2001 From: mapingshuo Date: Wed, 23 Sep 2020 14:02:42 +0800 Subject: [PATCH] add is_strict_auto --- python/paddle/distributed/fleet/base/distributed_strategy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/paddle/distributed/fleet/base/distributed_strategy.py b/python/paddle/distributed/fleet/base/distributed_strategy.py index 6c287473b6..35973ceb37 100755 --- a/python/paddle/distributed/fleet/base/distributed_strategy.py +++ b/python/paddle/distributed/fleet/base/distributed_strategy.py @@ -626,6 +626,7 @@ class DistributedStrategy(object): return self.strategy.zero @zero.setter + @is_strict_auto def zero(self, flag): if isinstance(flag, bool): self.strategy.zero = flag @@ -640,6 +641,7 @@ class DistributedStrategy(object): return get_msg_dict(self.strategy.zero_configs) @zero_configs.setter + @is_strict_auto def zero_configs(self, configs): check_configs_key(self.strategy.zero_configs, configs, "zero_configs") assign_configs_value(self.strategy.zero_configs, configs) -- GitLab