Skip to content

Commit 79ceef9

Browse files
authored
not use standalone_executor on fleet (#41630) (#41654)
1 parent 20f13f1 commit 79ceef9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

python/paddle/fluid/executor.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,13 @@ def _is_enable_standalone_executor():
395395
"""
396396
flag = False
397397

398-
env_val = os.environ.get('FLAGS_USE_STANDALONE_EXECUTOR', '1')
398+
from ..distributed.fleet import fleet
399+
if fleet._role_maker is not None:
400+
warnings.warn("do not use standalone executor in fleet by default")
401+
env_val = os.environ.get('FLAGS_USE_STANDALONE_EXECUTOR', None)
402+
else:
403+
env_val = os.environ.get('FLAGS_USE_STANDALONE_EXECUTOR', '1')
404+
399405
if env_val in [1, '1', True, 'True', 'true']:
400406
flag = True
401407

0 commit comments

Comments
 (0)