megengine.hub.import_module¶
-
import_module
(repo_info, git_host, use_cache=True, commit=None, protocol='HTTPS')[源代码]¶ 以类似python import的方式 import hubmodule。
- 参数
repo_info (
str
) – 格式为"repo_owner/repo_name[:tag_name/:branch_name]"
的字符串,其中tag/branch是可选的。 若不指明,则默认分支是master
。 例如:"brain_sdk/MegBrain[:hub]"
git_host (
str
) – git repo的主机地址。例如:github.comuse_cache (
bool
) – 选择使用本地缓存的代码或完全重新拉取代码。protocol (
str
) – 获得代码仓库所使用的协议,其中,HTTPS协议只支持github公共仓库。该参数值可为HTTPS 或 SSH。
- 返回
一个python模块。