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

update 2.0 public api in utils (#32008)

上级 c47bafc6
......@@ -12,21 +12,25 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from .profiler import ProfilerOptions
from .profiler import Profiler
from .profiler import get_profiler
from .deprecated import deprecated
from .lazy_import import try_import
from .op_version import OpLastCheckpointChecker
from .install_check import run_check
from ..fluid.framework import unique_name
from ..fluid.framework import require_version
from .profiler import ProfilerOptions # noqa: F401
from .profiler import Profiler # noqa: F401
from .profiler import get_profiler # noqa: F401
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 ..fluid.framework import require_version # noqa: F401
from . import download
from . import download # noqa: F401
from . import image_util # noqa: F401
from . import cpp_extension # noqa: F401
from . import cpp_extension
__all__ = ['dump_config', 'deprecated', 'download', 'run_check']
#TODO: define new api under this directory
__all__ += ['unique_name', 'require_version']
__all__ = [ #noqa
'deprecated',
'download',
'run_check',
'unique_name',
'require_version',
'try_import'
]
......@@ -12,18 +12,20 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from .cpp_extension import CUDAExtension
from .cpp_extension import CppExtension
from .cpp_extension import BuildExtension
from .cpp_extension import load, setup
from .cpp_extension import CUDAExtension # noqa: F401
from .cpp_extension import CppExtension # noqa: F401
from .cpp_extension import BuildExtension # noqa: F401
from .cpp_extension import load # noqa: F401
from .cpp_extension import setup # noqa: F401
from .extension_utils import parse_op_info
from .extension_utils import get_build_directory
from .extension_utils import load_op_meta_info_and_register_op
from .extension_utils import parse_op_info # noqa: F401
from .extension_utils import get_build_directory # noqa: F401
from .extension_utils import load_op_meta_info_and_register_op # noqa: F401
from . import cpp_extension
from . import extension_utils
__all__ = [
'CppExtension', 'CUDAExtension', 'load', 'setup', 'get_build_directory'
__all__ = [ #noqa
'CppExtension',
'CUDAExtension',
'load',
'setup',
'get_build_directory'
]
......@@ -55,8 +55,6 @@ except:
import logging
logger = logging.getLogger(__name__)
__all__ = ['get_weights_path_from_url']
WEIGHTS_HOME = osp.expanduser("~/.cache/paddle/hapi/weights")
DOWNLOAD_RETRY_LIMIT = 3
......
......@@ -20,8 +20,6 @@ import numpy as np
import paddle
__all__ = ['run_check']
def _simple_network():
"""
......
......@@ -14,8 +14,6 @@
from ..fluid import core
__all__ = ['OpLastCheckpointChecker']
def Singleton(cls):
_instance = {}
......
......@@ -18,9 +18,22 @@ import sys
import warnings
from ..fluid import core
from ..fluid.profiler import *
__all__ = ['ProfilerOptions', 'Profiler', 'get_profiler']
from ..fluid.profiler import cuda_profiler # noqa: F401
from ..fluid.profiler import start_profiler
from ..fluid.profiler import profiler # noqa: F401
from ..fluid.profiler import stop_profiler
from ..fluid.profiler import reset_profiler
__all__ = [ #noqa
'Profiler',
'get_profiler',
'ProfilerOptions',
'cuda_profiler',
'start_profiler',
'profiler',
'stop_profiler',
'reset_profiler'
]
class ProfilerOptions(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册