未验证 提交 a77ade0e 编写于 作者: Z zhiboniu 提交者: GitHub

remove packages in __all__ (#32759)

* [OPs] Bug fix, fix the segment mean for illegal syncthreads usage. (#32596) (#32610)

* [OPs] Bug fix, fix the segment mean for illegal syncthreads usage.

* remove packages in __all__

* create new public api level paddle.callbacks;paddle.hub;paddle.utils.unique_name
Co-authored-by: NZhong Hui <zhonghui.net@gmail.com>
上级 37534168
......@@ -269,10 +269,10 @@ from .fluid.layers import crop_tensor as crop # noqa: F401
# high-level api
from .hapi import Model # noqa: F401
from .hapi import callbacks # noqa: F401
from . import callbacks # noqa: F401
from .hapi import summary # noqa: F401
from .hapi import flops # noqa: F401
from .hapi import hub # noqa: F401
from . import hub # noqa: F401
import paddle.text # noqa: F401
import paddle.vision # noqa: F401
......@@ -335,10 +335,8 @@ __all__ = [ #noqa
'unsqueeze_',
'argmax',
'Model',
'callbacks',
'summary',
'flops',
'hub',
'sort',
'split',
'logical_and',
......
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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 .hapi.callbacks import Callback # noqa: F401
from .hapi.callbacks import ProgBarLogger # noqa: F401
from .hapi.callbacks import ModelCheckpoint # noqa: F401
from .hapi.callbacks import VisualDL # noqa: F401
from .hapi.callbacks import LRScheduler # noqa: F401
from .hapi.callbacks import EarlyStopping # noqa: F401
from .hapi.callbacks import ReduceLROnPlateau # noqa: F401
__all__ = [ #noqa
'Callback',
'ProgBarLogger',
'ModelCheckpoint',
'VisualDL',
'LRScheduler',
'EarlyStopping',
'ReduceLROnPlateau'
]
......@@ -25,10 +25,7 @@ from paddle.utils import try_import
from .progressbar import ProgressBar
__all__ = [
'Callback', 'ProgBarLogger', 'ModelCheckpoint', 'VisualDL', 'LRScheduler',
'EarlyStopping', 'ReduceLROnPlateau'
]
__all__ = []
def config_callbacks(callbacks=None,
......
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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 .hapi.hub import list # noqa: F401
from .hapi.hub import help # noqa: F401
from .hapi.hub import load # noqa: F401
__all__ = [ #noqa
'list', 'help', 'load'
]
......@@ -232,10 +232,8 @@ __all__ = [ #noqa
'MaxPool3D',
'AdaptiveMaxPool2D',
'Hardshrink',
'clip',
'Softplus',
'KLDivLoss',
'clip_by_norm',
'AvgPool2D',
'L1Loss',
'LeakyReLU',
......
......@@ -19,7 +19,7 @@ from .deprecated import deprecated # noqa: F401
from .lazy_import import try_import # noqa: F401
from .op_version import OpLastCheckpointChecker # noqa: F401
from .install_check import run_check # noqa: F401
from ..fluid.framework import unique_name # noqa: F401
from . import unique_name # noqa: F401
from ..fluid.framework import require_version # noqa: F401
from . import download # noqa: F401
......@@ -27,10 +27,5 @@ from . import image_util # noqa: F401
from . import cpp_extension # noqa: F401
__all__ = [ #noqa
'deprecated',
'download',
'run_check',
'unique_name',
'require_version',
'try_import'
'deprecated', 'run_check', 'require_version', 'try_import'
]
......@@ -55,7 +55,7 @@ except:
import logging
logger = logging.getLogger(__name__)
__all__ = []
__all__ = ['get_weights_path_from_url']
WEIGHTS_HOME = osp.expanduser("~/.cache/paddle/hapi/weights")
......
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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 ..fluid.unique_name import generate # noqa: F401
from ..fluid.unique_name import switch # noqa: F401
from ..fluid.unique_name import guard # noqa: F401
__all__ = [ #noqa
'generate', 'switch', 'guard'
]
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册