From 0721767ba90536ee205ca04ac35dd0c124a797c8 Mon Sep 17 00:00:00 2001 From: danleifeng <52735331+danleifeng@users.noreply.github.com> Date: Wed, 23 Sep 2020 10:18:32 +0800 Subject: [PATCH] fix server_num bug;test=develop (#27442) --- python/paddle/distributed/fleet/base/role_maker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/paddle/distributed/fleet/base/role_maker.py b/python/paddle/distributed/fleet/base/role_maker.py index 81d5908ccd..f66f013e4d 100644 --- a/python/paddle/distributed/fleet/base/role_maker.py +++ b/python/paddle/distributed/fleet/base/role_maker.py @@ -605,7 +605,8 @@ class PaddleCloudRoleMaker(RoleMakerBase): """ if not self._role_is_generated: self._generate_role() - return len(self._get_pserver_endpoints()) + return len(self._get_pserver_endpoints( + )) if self._get_pserver_endpoints() is not None else 0 def _node_num(self): """ -- GitLab