From 3395008f116e645e51593e1fb6ec4fe6e99fd9c6 Mon Sep 17 00:00:00 2001 From: Dong Daxiang <35550832+guru4elephant@users.noreply.github.com> Date: Wed, 8 Jul 2020 13:14:38 +0800 Subject: [PATCH] remove async configuration from distributed_strategy.py (#25425) test=develop --- python/paddle/fleet/base/distributed_strategy.py | 11 ----------- .../unittests/test_fleet_distributed_strategy.py | 9 --------- 2 files changed, 20 deletions(-) diff --git a/python/paddle/fleet/base/distributed_strategy.py b/python/paddle/fleet/base/distributed_strategy.py index c72e3ca160d..0ebaff3a0f7 100644 --- a/python/paddle/fleet/base/distributed_strategy.py +++ b/python/paddle/fleet/base/distributed_strategy.py @@ -374,17 +374,6 @@ class DistributedStrategy(object): else: print("WARNING: sync should have value of bool type") - @property - def async(self): - return self.strategy.async - - @async.setter - def async(self, flag): - if isinstance(flag, bool): - self.strategy.async = flag - else: - print("WARNING: async should have value of bool type") - @property def async_k_step(self): return self.strategy.async_k_step diff --git a/python/paddle/fluid/tests/unittests/test_fleet_distributed_strategy.py b/python/paddle/fluid/tests/unittests/test_fleet_distributed_strategy.py index 3ec220d841d..0668546a703 100644 --- a/python/paddle/fluid/tests/unittests/test_fleet_distributed_strategy.py +++ b/python/paddle/fluid/tests/unittests/test_fleet_distributed_strategy.py @@ -247,15 +247,6 @@ class TestStrategyConfig(unittest.TestCase): strategy.sync = "True" self.assertEqual(strategy.sync, False) - def test_async(self): - strategy = paddle.fleet.DistributedStrategy() - strategy.async = True - self.assertEqual(strategy.async, True) - strategy.async = False - self.assertEqual(strategy.async, False) - strategy.async = "True" - self.assertEqual(strategy.async, False) - def test_async_k_step(self): strategy = paddle.fleet.DistributedStrategy() strategy.async_k_step = 10000 -- GitLab