From f62dfc62383720373caa32d4dd42b57a263a15f8 Mon Sep 17 00:00:00 2001 From: zhangchunle Date: Fri, 8 May 2020 14:01:08 +0800 Subject: [PATCH] fs_wrapper add __all__ (#24335) --- python/paddle/__init__.py | 2 +- python/paddle/distributed/__init__.py | 3 +++ python/paddle/distributed/fs_wrapper.py | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/python/paddle/__init__.py b/python/paddle/__init__.py index bc5a72bf8e7..07073bfbfde 100644 --- a/python/paddle/__init__.py +++ b/python/paddle/__init__.py @@ -30,9 +30,9 @@ except ImportError: import paddle.reader import paddle.dataset import paddle.batch +batch = batch.batch import paddle.compat import paddle.distributed -batch = batch.batch import paddle.sysconfig import paddle.tensor import paddle.nn diff --git a/python/paddle/distributed/__init__.py b/python/paddle/distributed/__init__.py index d0c32e26092..1e71b316b06 100644 --- a/python/paddle/distributed/__init__.py +++ b/python/paddle/distributed/__init__.py @@ -11,3 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +from . import fs_wrapper + +__all__ = fs_wrapper.__all__ diff --git a/python/paddle/distributed/fs_wrapper.py b/python/paddle/distributed/fs_wrapper.py index 014ef3ef8de..d73d144e1c4 100644 --- a/python/paddle/distributed/fs_wrapper.py +++ b/python/paddle/distributed/fs_wrapper.py @@ -19,6 +19,8 @@ import os from pathlib import PurePosixPath import shutil +__all__ = ['FS', 'LocalFS', 'BDFS'] + class FS(object): @abc.abstractmethod -- GitLab