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

update 2.0 public api in utils (#32008)

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