MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / list

Function list

imperative/python/megengine/hub/hub.py:119–146  ·  view source on GitHub ↗

r"""Lists all entrypoints available in repo hubconf. Args: repo_info: 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]"`` git_host:

(
    repo_info: str,
    git_host: str = DEFAULT_GIT_HOST,
    use_cache: bool = True,
    commit: str = None,
    protocol: str = DEFAULT_PROTOCOL,
)

Source from the content-addressed store, hash-verified

117
118
119def list(
120 repo_info: str,
121 git_host: str = DEFAULT_GIT_HOST,
122 use_cache: bool = True,
123 commit: str = None,
124 protocol: str = DEFAULT_PROTOCOL,
125) -> List[str]:
126 r"""Lists all entrypoints available in repo hubconf.
127
128 Args:
129 repo_info: a string with format ``"repo_owner/repo_name[:tag_name/:branch_name]"`` with an optional
130 tag/branch. The default branch is ``master`` if not specified. Eg: ``"brain_sdk/MegBrain[:hub]"``
131 git_host: host address of git repo. Eg: github.com
132 use_cache: whether to use locally cached code or completely re-fetch.
133 commit: commit id on github or gitlab.
134 protocol: which protocol to use to get the repo, and HTTPS protocol only supports public repo on github.
135 The value should be one of HTTPS, SSH.
136
137 Returns:
138 all entrypoint names of the model.
139 """
140 hubmodule = _init_hub(repo_info, git_host, use_cache, commit, protocol)
141
142 return [
143 _
144 for _ in dir(hubmodule)
145 if not _.startswith("__") and callable(getattr(hubmodule, _))
146 ]
147
148
149def load(

Callers 15

check_windowsFunction · 0.85
load_tensor_binaryFunction · 0.85
load_single_graphMethod · 0.85
_load_dataMethod · 0.85
prof_detailsFunction · 0.85
make_data_given_descFunction · 0.85
benchmark_op.pyFile · 0.85
load_single_graphFunction · 0.85
_infer_broadcasted_shapeFunction · 0.85
dumpMethod · 0.85
add_dep_oprsMethod · 0.85

Calls 1

_init_hubFunction · 0.85

Tested by 15

runnerFunction · 0.68
test_replace_varFunction · 0.68
test_getattribute_paramFunction · 0.68
test_module_apiFunction · 0.68
test_expand_structureFunction · 0.68
test_flatten_othersFunction · 0.68
test_flatten_with_parentFunction · 0.68
test_assert_messageFunction · 0.68