diff --git a/python/paddle/distributed/fleet/__init__.py b/python/paddle/distributed/fleet/__init__.py index f3ee09a6d9ec1b22171253a920b26bbf98afd36e..d99218ae44846e96f9ea06670e6de29b3388374b 100644 --- a/python/paddle/distributed/fleet/__init__.py +++ b/python/paddle/distributed/fleet/__init__.py @@ -29,6 +29,7 @@ __all__ = [ ] fleet = Fleet() +_role_maker_ = fleet._role_maker_ init = fleet.init is_first_worker = fleet.is_first_worker worker_index = fleet.worker_index diff --git a/python/paddle/distributed/fleet/base/fleet_base.py b/python/paddle/distributed/fleet/base/fleet_base.py index 0ee140941cc83442a0631a8c57cddf0f0ce3c0cc..ed94e785a2e453058724890103ac9bbc7c56fc41 100644 --- a/python/paddle/distributed/fleet/base/fleet_base.py +++ b/python/paddle/distributed/fleet/base/fleet_base.py @@ -190,6 +190,9 @@ class Fleet(object): else: paddle.distributed.init_parallel_env() + def _role_maker_(self): + return self._role_maker + def is_first_worker(self): """ Check whether the node is the first instance of worker. diff --git a/python/paddle/distributed/fleet/utils/fs.py b/python/paddle/distributed/fleet/utils/fs.py index b7c50bda3eae0a004bd3d0169fc62260393b28b8..d821c190f62cdd3874fbfd90deec6653d27a84a1 100644 --- a/python/paddle/distributed/fleet/utils/fs.py +++ b/python/paddle/distributed/fleet/utils/fs.py @@ -751,9 +751,6 @@ class HDFSClient(FS): client = HDFSClient(hadoop_home, configs) client.download("hdfs:/test_hdfs_client", "./") """ - if self.is_exist(local_path): - raise FSFileExistsError("{} exists".format(local_path)) - if not self.is_exist(fs_path): raise FSFileNotExistsError("{} not exits".format(fs_path))