From 746a8ded293d01be7b394266417769f561da645e Mon Sep 17 00:00:00 2001 From: ShenLiang Date: Thu, 17 Sep 2020 10:19:27 +0800 Subject: [PATCH] fix comment of adaptive lsgd (#27362) --- .../distributed/fleet/meta_optimizers/amp_optimizer.py | 10 +++++++--- .../fleet/meta_optimizers/localsgd_optimizer.py | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/python/paddle/distributed/fleet/meta_optimizers/amp_optimizer.py b/python/paddle/distributed/fleet/meta_optimizers/amp_optimizer.py index 3e89d382111..ad96e142669 100644 --- a/python/paddle/distributed/fleet/meta_optimizers/amp_optimizer.py +++ b/python/paddle/distributed/fleet/meta_optimizers/amp_optimizer.py @@ -22,9 +22,13 @@ class AMPOptimizer(MetaOptimizerBase): self.amp_opt = None # we do not allow meta optimizer to be inner optimizer currently self.meta_optimizers_white_list = [ - "LarsOptimizer", "LambOptimizer", "RecomputeOptimizer", - "LocalSGDOptimizer", "GradientMergeOptimizer", - "GraphExecutionOptimizer", "AdaptiveLocalSGDOptimizer" + "LarsOptimizer", + "LambOptimizer", + "RecomputeOptimizer", + "LocalSGDOptimizer", + "GradientMergeOptimizer", + "GraphExecutionOptimizer", + "AdaptiveLocalSGDOptimizer", ] self.meta_optimizers_black_list = ["DGCOptimizer"] diff --git a/python/paddle/distributed/fleet/meta_optimizers/localsgd_optimizer.py b/python/paddle/distributed/fleet/meta_optimizers/localsgd_optimizer.py index 75271968fca..4ebac20888d 100644 --- a/python/paddle/distributed/fleet/meta_optimizers/localsgd_optimizer.py +++ b/python/paddle/distributed/fleet/meta_optimizers/localsgd_optimizer.py @@ -26,7 +26,8 @@ class LocalSGDOptimizer(MetaOptimizerBase): self.inner_opt = optimizer self.meta_optimizers_white_list = [] self.meta_optimizers_black_list = [ - "GraphExecutionOptimizer", "AdaptiveLocalSGDOptimizer" + "GraphExecutionOptimizer", + "AdaptiveLocalSGDOptimizer", ] self.snapshot_key = '@SNAPSHOT' -- GitLab