remove async configuration from distributed_strategy.py (#25425)

test=develop
fix_copy_if_different
Dong Daxiang 5 years ago committed by GitHub
parent 01cf8e893f
commit 3395008f11
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

@ -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

Loading…
Cancel
Save