Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs to not mention 'registration mechanism' - and move corresponding utils out of Beta #7142

Merged
merged 6 commits into from
Feb 1, 2023
Merged
13 changes: 7 additions & 6 deletions docs/source/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,14 @@ behavior, such as batch normalization. To switch between these modes, use
# Set model to eval mode
model.eval()

Model Registration Mechanism
----------------------------
Listing and retrieving available models
---------------------------------------

.. betastatus:: registration mechanism
.. betastatus:: these helpers
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is rendered as

"The these helpers is in Beta stage, and backward compatibility is not guaranteed."

See

text = f"The {api_name} is in Beta stage, and backward compatibility is not guaranteed."

Suggested change
.. betastatus:: these helpers
.. betastatus:: API for listing and retrieving available models

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, thanks.
You know what, let's just remove that and make them stable. We won't be breaking them anyway so there's no reason they should be beta.


As of v0.14, TorchVision offers a new model registration mechanism which allows retreaving models
and weights by their names. Here are a few examples on how to use them:
As of v0.14, TorchVision offers a new mechanism which allows listing and
retrieving models and weights by their names. Here are a few examples on how to
use them:

.. code:: python

Expand All @@ -148,7 +149,7 @@ and weights by their names. Here are a few examples on how to use them:
weights_enum2 = get_model_weights(torchvision.models.quantization.mobilenet_v3_large)
assert weights_enum == weights_enum2

Here are the available public methods of the model registration mechanism:
Here are the available public functions to retrieve models and their corresponding weights:

.. currentmodule:: torchvision.models
.. autosummary::
Expand Down