提交 d481f83a 编写于 作者: W wuzewu

move utility function to utils

上级 6feed453
......@@ -30,7 +30,7 @@ from paddle_hub.downloader import download_and_uncompress
from paddle_hub import module_desc_pb2
from paddle_hub.logger import logger
from paddle_hub.signature import Signature
from paddle_hub.utils import to_list, get_variable_info
from paddle_hub.utils import to_list, get_variable_info, mkdir
from paddle_hub.version import __version__
__all__ = ["Module", "ModuleConfig", "ModuleUtils"]
......@@ -47,13 +47,6 @@ MODULE_DESC_PBNAME = "module_desc.pb"
HUB_VAR_PREFIX = "@HUB@"
def mkdir(path):
""" the same as the shell command mkdir -p "
"""
if not os.path.exists(path):
os.makedirs(path)
class Module(object):
"""
Core object of PaddleHub
......
......@@ -53,3 +53,10 @@ def get_variable_info(var):
var_info['persistable'] = var.persistable
return var_info
def mkdir(path):
""" the same as the shell command mkdir -p "
"""
if not os.path.exists(path):
os.makedirs(path)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册