diff --git a/python/paddle/io/__init__.py b/python/paddle/io/__init__.py index 59e2729941e4168139ec9f0cb7856e38d0548f0f..5781f78c6e4e4ad487e8a53e62e4c134206b6945 100755 --- a/python/paddle/io/__init__.py +++ b/python/paddle/io/__init__.py @@ -13,26 +13,37 @@ # limitations under the License. # TODO: define all functions about input & output in this directory -__all__ = [ - 'Dataset', - 'IterableDataset', - 'TensorDataset', - 'ComposeDataset', - 'ChainDataset', - 'BatchSampler', - 'DistributedBatchSampler', - # 'Transform', - 'DataLoader', - 'get_worker_info', - 'Sampler', - 'SequenceSampler', - 'RandomSampler', - 'WeightedRandomSampler', - 'random_split', - 'Subset' -] -from ..fluid.io import DataLoader -from ..fluid.dataloader import Dataset, IterableDataset, BatchSampler, get_worker_info, \ - TensorDataset, Sampler, SequenceSampler, RandomSampler, DistributedBatchSampler, \ - ComposeDataset, ChainDataset, WeightedRandomSampler, Subset, random_split +from ..fluid.io import DataLoader # noqa: F401 +from ..fluid.dataloader import Dataset # noqa: F401 +from ..fluid.dataloader import IterableDataset # noqa: F401 +from ..fluid.dataloader import BatchSampler # noqa: F401 +from ..fluid.dataloader import get_worker_info # noqa: F401 +from ..fluid.dataloader import TensorDataset # noqa: F401 +from ..fluid.dataloader import Sampler # noqa: F401 +from ..fluid.dataloader import SequenceSampler # noqa: F401 +from ..fluid.dataloader import RandomSampler # noqa: F401 +from ..fluid.dataloader import DistributedBatchSampler # noqa: F401 +from ..fluid.dataloader import ComposeDataset # noqa: F401 +from ..fluid.dataloader import ChainDataset # noqa: F401 +from ..fluid.dataloader import WeightedRandomSampler # noqa: F401 +from ..fluid.dataloader import Subset # noqa: F401 +from ..fluid.dataloader import random_split # noqa: F401 + +__all__ = [ #noqa + 'Dataset', + 'IterableDataset', + 'TensorDataset', + 'ComposeDataset', + 'ChainDataset', + 'BatchSampler', + 'DistributedBatchSampler', + 'DataLoader', + 'get_worker_info', + 'Sampler', + 'SequenceSampler', + 'RandomSampler', + 'WeightedRandomSampler', + 'random_split', + 'Subset' +] diff --git a/python/paddle/reader/__init__.py b/python/paddle/reader/__init__.py index 1a4d45469235dac16eaa414b8fc6350bbbb040fa..9002cd0676edaa2d959f673e5c80a061f6a41884 100644 --- a/python/paddle/reader/__init__.py +++ b/python/paddle/reader/__init__.py @@ -63,7 +63,15 @@ An example implementation for multiple item data reader creator: """ -import paddle.reader.decorator -from paddle.reader.decorator import * +from paddle.reader.decorator import map_readers # noqa: F401 +from paddle.reader.decorator import shuffle # noqa: F401 +from paddle.reader.decorator import xmap_readers # noqa: F401 +from paddle.reader.decorator import firstn # noqa: F401 +from paddle.reader.decorator import buffered # noqa: F401 +from paddle.reader.decorator import compose # noqa: F401 +from paddle.reader.decorator import cache # noqa: F401 +from paddle.reader.decorator import ComposeNotAligned # noqa: F401 +from paddle.reader.decorator import chain # noqa: F401 +from paddle.reader.decorator import multiprocess_reader # noqa: F401 __all__ = [] diff --git a/python/paddle/reader/decorator.py b/python/paddle/reader/decorator.py index 8ee4d73ea847ea116ea4401b5b05ef1b925950fe..4e1c3827d3845473715696c48b68af01f5c627bf 100644 --- a/python/paddle/reader/decorator.py +++ b/python/paddle/reader/decorator.py @@ -12,11 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -__all__ = [ - 'cache', 'map_readers', 'buffered', 'compose', 'chain', 'shuffle', - 'ComposeNotAligned', 'firstn', 'xmap_readers', 'multiprocess_reader' -] - from threading import Thread import subprocess import multiprocessing