Skip to content

docs: fix docstring parameter names that do not match signatures - #48575

Merged
vasqu merged 1 commit into
huggingface:mainfrom
simpleqt:docs/docstring-param-mismatches
Sep 7, 2026
Merged

vasqu merged 1 commit into
huggingface:mainfrom
simpleqt:docs/docstring-param-mismatches

Conversation

@simpleqt

@simpleqt simpleqt commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

CPU CI GPU run-slow

Docstring-only fixes, each verified against the signature directly above it (found via an AST docstring-Args vs signature sweep):

  1. src/transformers/utils/peft_utils.py check_peft_version(min_version: str): docstring said version (str)
  2. src/transformers/integrations/hub_kernels.py load_and_register_attn_kernel(..., attention_wrapper: Callable | None = None, …): docstring said attn_wrapper
  3. src/transformers/pipelines/document_question_answering.py (match_and_aggregate-style fn with top_k=1): docstring said topk (int)

Docstrings only — no code change.

- utils/peft_utils.py check_peft_version documented 'version'; the
  parameter is min_version
- integrations/hub_kernels.py load_and_register_attn_kernel documented
  'attn_wrapper'; the parameter is attention_wrapper
- pipelines/document_question_answering.py match_and_aggregate-style
  fn documented 'topk'; the parameter is top_k

Docstring-only; found via an AST docstring-Args vs signature sweep.
Copilot AI lite review requested due to automatic review settings September 6, 2026 18:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 34051248310
Result: success | Grafana metrics are not available yet.

@vasqu vasqu left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

nice

@vasqu
vasqu enabled auto-merge September 7, 2026 13:22
@vasqu
vasqu added this pull request to the merge queue Sep 7, 2026
@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.

Merged via the queue into huggingface:main with commit 3822359 Sep 7, 2026
33 checks passed
sbucaille pushed a commit to sbucaille/transformers that referenced this pull request Sep 16, 2026
…gingface#48575)

- utils/peft_utils.py check_peft_version documented 'version'; the
  parameter is min_version
- integrations/hub_kernels.py load_and_register_attn_kernel documented
  'attn_wrapper'; the parameter is attention_wrapper
- pipelines/document_question_answering.py match_and_aggregate-style
  fn documented 'topk'; the parameter is top_k

Docstring-only; found via an AST docstring-Args vs signature sweep.
pull Bot pushed a commit to sandeepyadav1478/transformers that referenced this pull request Sep 18, 2026
…ace#48904)

- MaxTimeCriteria: the docstring prose and Args entry said
  'initial_time'; the parameter is 'initial_timestamp'.
- RTDetrLoss / DFineLoss: the Args blocks documented seven constructor
  parameters that do not exist (they are attributes built internally
  from config, and the matcher type was also stale); replaced with a
  single config entry.

Follows up on huggingface#48575/huggingface#48576 in the same docstring-vs-signature lane.
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