Skip to content

[docs] @auto_docstring decorator#45130

Merged
stevhliu merged 5 commits intohuggingface:mainfrom
stevhliu:autodocs
Apr 15, 2026
Merged

[docs] @auto_docstring decorator#45130
stevhliu merged 5 commits intohuggingface:mainfrom
stevhliu:autodocs

Conversation

@stevhliu
Copy link
Copy Markdown
Member

@stevhliu stevhliu commented Mar 30, 2026

updates the @auto_docstring docs as part of the process of improving the model addition docs

  • updates title to be more precise as it can mean documenting a model in a model.md file as well
  • flat hierarchy before → each component-type example has their own section now so its easier to find and reference. ### Documenting arguments is moved under ## Usage because it makes sense they live under one roof. how to document arguments is also part of the usage guidance
  • modeling_model.py was treated as the default before and there was a separate section for modular files → reframe modular files as the default since this is the standard way to add models
  • add some missing kwargs (BaseImageProcessor, ProcessorMixin, ModelOutputArgs)
  • removed some redundancies
  • update with some missing infos and adds additional context for some things like the @strict decorator
  • replace ## Best practices with a quick do/don't checklist users can quickly scan and reference

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Member

@zucchini-nlp zucchini-nlp left a comment

Choose a reason for hiding this comment

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

lgtm

title: Documenting a model
- local: model_output_tracing
title: Tracing model intermediate outputs
- isExpanded: false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh nice, much better indeed

This was referenced Apr 7, 2026
Copy link
Copy Markdown
Member

@yonigozlan yonigozlan left a comment

Choose a reason for hiding this comment

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

Very nice, looks much cleaner! lgtm!

Comment thread docs/source/en/auto_docstring.md
@stevhliu stevhliu added this pull request to the merge queue Apr 15, 2026
Merged via the queue into huggingface:main with commit f407faf Apr 15, 2026
16 checks passed
@stevhliu stevhliu deleted the autodocs branch April 15, 2026 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants