megengine.hub.help#

help(repo_info, entry, git_host=DEFAULT_GIT_HOST, use_cache=True, commit=None, protocol=DEFAULT_PROTOCOL)[源代码]#

通过以下步骤,该函数返回入口点 entry 的docstring :

  1. 拉取下来git和repo_info指定的仓库代码。

  2. 加载仓库中hubconf.py所定义的条目

  3. 返回函数入口的docstring(文档字符串)。

参数:
  • repo_info (str) – 格式为``”repo_owner/repo_name[:tag_name/:branch_name]”的字符串,其中可选参数为batch。如果没有特殊指定默认的分支为``master,例如:"brain_sdk/MegBrain[:hub]"

  • entry (str) – 一个在hubconf.py中定义的入口点

  • git_host (str) – git仓库的主地址。例如:github.com

  • use_cache (bool) – 选择使用本地缓存的代码或完全重新拉取代码。

  • commit (Optional[str]) – GitHub或GitLab的commit id。

  • protocol (str) – 获得代码仓库所使用的协议,其中,HTTPS协议只支持github公共仓库。该参数值可为HTTPS 或 SSH。

返回类型:

str

返回:

入口点 entry 的文档字符串。