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 3e89d38211107..ad96e1426694f 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 @@ def __init__(self, optimizer): 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 75271968fca68..4ebac20888dd7 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 @@ def __init__(self, optimizer): self.inner_opt = optimizer self.meta_optimizers_white_list = [] self.meta_optimizers_black_list = [ - "GraphExecutionOptimizer", "AdaptiveLocalSGDOptimizer" + "GraphExecutionOptimizer", + "AdaptiveLocalSGDOptimizer", ] self.snapshot_key = '@SNAPSHOT'