From bba41e451966e92818352ab528a08522da9f3a1a Mon Sep 17 00:00:00 2001 From: Guoxia Wang Date: Wed, 22 Sep 2021 19:12:09 +0800 Subject: [PATCH] fix bug of module 'paddle' has no attribute 'distributed' for python3.6 (#35848) (#35874) * fix bug --- python/paddle/distributed/__init__.py | 2 +- python/paddle/distributed/fleet/elastic/collective.py | 4 ++-- python/paddle/distributed/fleet/launch.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/paddle/distributed/__init__.py b/python/paddle/distributed/__init__.py index 4934f2093f3..20007f76ed5 100644 --- a/python/paddle/distributed/__init__.py +++ b/python/paddle/distributed/__init__.py @@ -13,7 +13,7 @@ # limitations under the License. from .spawn import spawn # noqa: F401 -from paddle.distributed.fleet.launch import launch # noqa: F401 +from .fleet.launch import launch # noqa: F401 from .parallel import init_parallel_env # noqa: F401 from .parallel import get_rank # noqa: F401 diff --git a/python/paddle/distributed/fleet/elastic/collective.py b/python/paddle/distributed/fleet/elastic/collective.py index 94fe6a54b58..83f0e85db2b 100644 --- a/python/paddle/distributed/fleet/elastic/collective.py +++ b/python/paddle/distributed/fleet/elastic/collective.py @@ -13,8 +13,8 @@ # limitations under the License. from paddle.distributed.fleet import launch_utils -import paddle.distributed.fleet.cloud_utils as cloud_utils -import paddle.distributed.fleet.ascend_utils as ascend_utils +from paddle.distributed.fleet import cloud_utils +from paddle.distributed.fleet import ascend_utils from paddle.distributed.fleet.launch_utils import * diff --git a/python/paddle/distributed/fleet/launch.py b/python/paddle/distributed/fleet/launch.py index 9a2c5b551cc..c0a1c359d17 100644 --- a/python/paddle/distributed/fleet/launch.py +++ b/python/paddle/distributed/fleet/launch.py @@ -72,8 +72,8 @@ from paddle.distributed.fleet import launch_utils # TODO(danleifeng): Don't import * from a module from paddle.distributed.fleet.launch_utils import * -import paddle.distributed.fleet.cloud_utils as cloud_utils -import paddle.distributed.fleet.ascend_utils as ascend_utils +from paddle.distributed.fleet import cloud_utils +from paddle.distributed.fleet import ascend_utils from paddle.distributed.fleet.elastic import enable_elastic, launch_elastic -- GitLab