megengine.hub.help

help(repo_info, entry, git_host=DEFAULT_GIT_HOST, use_cache=True, commit=None, protocol=DEFAULT_PROTOCOL)[source]

This function returns docstring of entrypoint entry by following steps:

  1. Pull the repo code specified by git and repo_info.

  2. Load the entry defined in repo’s hubconf.py

  3. Return docstring of function entry.

Parameters
  • repo_info (str) – a string with format "repo_owner/repo_name[:tag_name/:branch_name]" with an optional tag/branch. The default branch is master if not specified. Eg: "brain_sdk/MegBrain[:hub]"

  • entry (str) – an entrypoint defined in hubconf.py

  • git_host (str) – host address of git repo. Eg: github.com

  • use_cache (bool) – whether to use locally cached code or completely re-fetch.

  • commit (Optional[str]) – commit id on github or gitlab.

  • protocol (str) – which protocol to use to get the repo, and HTTPS protocol only supports public repo on github. The value should be one of HTTPS, SSH.

Return type

str

Returns

docstring of entrypoint entry.