Skip to content

Commit

Permalink
fix weight docs (#7993)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicolas Hug <nh.nicolas.hug@gmail.com>
  • Loading branch information
pmeier and NicolasHug committed Sep 25, 2023
1 parent 7ba3d7e commit 68fbd3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ def inject_weight_metadata(app, what, name, obj, options, lines):
used within the autoclass directive.
"""

if getattr(obj, ".__name__", "").endswith(("_Weights", "_QuantizedWeights")):
if getattr(obj, "__name__", "").endswith(("_Weights", "_QuantizedWeights")):

if len(obj) == 0:
lines[:] = ["There are no available pre-trained weights."]
Expand Down

0 comments on commit 68fbd3c

Please sign in to comment.