Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions torch/hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand All @@ -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))
"""
Expand Down Expand Up @@ -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.
Expand All @@ -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``.
Expand Down