From 79ceef9ea520c82abc7df7fbc5af758759e82c36 Mon Sep 17 00:00:00 2001 From: Leo Chen Date: Tue, 12 Apr 2022 21:48:08 +0800 Subject: [PATCH] not use standalone_executor on fleet (#41630) (#41654) --- python/paddle/fluid/executor.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/executor.py b/python/paddle/fluid/executor.py index 2232c34e63b..86b0d6560c9 100644 --- a/python/paddle/fluid/executor.py +++ b/python/paddle/fluid/executor.py @@ -395,7 +395,13 @@ def _is_enable_standalone_executor(): """ flag = False - env_val = os.environ.get('FLAGS_USE_STANDALONE_EXECUTOR', '1') + from ..distributed.fleet import fleet + if fleet._role_maker is not None: + warnings.warn("do not use standalone executor in fleet by default") + env_val = os.environ.get('FLAGS_USE_STANDALONE_EXECUTOR', None) + else: + env_val = os.environ.get('FLAGS_USE_STANDALONE_EXECUTOR', '1') + if env_val in [1, '1', True, 'True', 'true']: flag = True -- GitLab