Minor torchhub docs

Pull Request resolved: https://github.com/pytorch/pytorch/pull/77160

Approved by: https://github.com/vmoens
This commit is contained in:
Nicolas Hug
2022-05-10 11:01:56 +01:00
committed by PyTorch MergeBot
parent 721a8ca697
commit da3ebaebee

View File

@ -368,7 +368,8 @@ def list(github, force_reload=False, skip_validation=False, trust_repo=None):
requests to the GitHub API; you can specify a non-default GitHub token by setting the
``GITHUB_TOKEN`` environment variable. Default is ``False``.
trust_repo (bool, string or None): ``"check"``, ``True``, ``False`` or ``None``.
This parameter helps ensuring that users only run code from repos that they trust.
This parameter was introduced in v1.12 and helps ensuring that users
only run code from repos that they trust.
- If ``False``, a prompt will ask the user whether the repo should
be trusted.
@ -382,7 +383,7 @@ def list(github, force_reload=False, skip_validation=False, trust_repo=None):
is only present for backward compatibility and will be removed in
v1.14.
Default is ``None`` and will eventually change to ``"check"`` in a future version.
Default is ``None`` and will eventually change to ``"check"`` in v1.14.
Returns:
list: The available callables entrypoint
@ -423,7 +424,8 @@ def help(github, model, force_reload=False, skip_validation=False, trust_repo=No
requests to the GitHub API; you can specify a non-default GitHub token by setting the
``GITHUB_TOKEN`` environment variable. Default is ``False``.
trust_repo (bool, string or None): ``"check"``, ``True``, ``False`` or ``None``.
This parameter helps ensuring that users only run code from repos that they trust.
This parameter was introduced in v1.12 and helps ensuring that users
only run code from repos that they trust.
- If ``False``, a prompt will ask the user whether the repo should
be trusted.
@ -437,7 +439,7 @@ def help(github, model, force_reload=False, skip_validation=False, trust_repo=No
is only present for backward compatibility and will be removed in
v1.14.
Default is ``None`` and will eventually change to ``"check"`` in a future version.
Default is ``None`` and will eventually change to ``"check"`` in v1.14.
Example:
>>> print(torch.hub.help('pytorch/vision', 'resnet18', force_reload=True))
"""
@ -484,7 +486,8 @@ def load(repo_or_dir, model, *args, source='github', trust_repo=None, force_relo
source (string, optional): 'github' or 'local'. Specifies how
``repo_or_dir`` is to be interpreted. Default is 'github'.
trust_repo (bool, string or None): ``"check"``, ``True``, ``False`` or ``None``.
This parameter helps ensuring that users only run code from repos that they trust.
This parameter was introduced in v1.12 and helps ensuring that users
only run code from repos that they trust.
- If ``False``, a prompt will ask the user whether the repo should
be trusted.
@ -498,7 +501,7 @@ def load(repo_or_dir, model, *args, source='github', trust_repo=None, force_relo
is only present for backward compatibility and will be removed in
v1.14.
Default is ``None`` and will eventually change to ``"check"`` in a future version.
Default is ``None`` and will eventually change to ``"check"`` in v1.14.
force_reload (bool, optional): whether to force a fresh download of
the github repo unconditionally. Does not have any effect if
``source = 'local'``. Default is ``False``.