Skip to content

Indicate which weights correspond to pretrained=True in docs #5993

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

Closed
wants to merge 1 commit into from
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
10 changes: 9 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,16 @@ def inject_weight_metadata(app, what, name, obj, options, lines):

for field in obj:
lines += [f"**{str(field)}**:", ""]

if field == obj.DEFAULT:
lines += [f"This weight is also available as ``{obj.__name__}.DEFAULT``.", ""]
lines += [f"These weights are also available as ``{obj.__name__}.DEFAULT``."]
if field.name.endswith("V1"):
lines += [
"These weights are the ones you get when using ``pretrained=True``, "
"but note that ``pretrained`` is deprecated and will be removed in 0.15."
]

lines.append("")

table = []

Expand Down