Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【cherry-pick】cherry-pick 'update for py3.6 bug' PR to release/2.4 #46325

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/paddle/incubate/optimizer/distributed_fused_lamb.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
# limitations under the License.

import os
import paddle
from paddle.fluid import framework, core, layers, unique_name
from paddle.fluid.framework import Variable
from paddle.fluid.clip import ClipGradByGlobalNorm
from paddle.fluid.initializer import Constant
from paddle.fluid.layer_helper import LayerHelper
from paddle.fluid.optimizer import Optimizer
import paddle.distributed as dist
from paddle.distributed.collective import new_group
from paddle.fluid.executor import global_scope
from paddle.fluid.framework import name_scope
Expand Down Expand Up @@ -288,8 +288,8 @@ def _apply_gradients_impl(self, params_grads):

step = self._get_or_create_step()

rank = dist.get_rank()
nranks = dist.get_world_size()
rank = paddle.distributed.get_rank()
nranks = paddle.distributed.get_world_size()
if self._nproc_per_node is None:
nproc_per_node = nranks
else:
Expand Down