Skip to content

[Docs] Fix WhisperEncoderLayer.forward docstring in dots3_note - #52134

Merged
vllm-bot merged 1 commit into
vllm-project:mainfrom
hmellor:fix-audio-encoder-docstring
Aug 13, 2026
Merged

[Docs] Fix WhisperEncoderLayer.forward docstring in dots3_note#52134
vllm-bot merged 1 commit into
vllm-project:mainfrom
hmellor:fix-audio-encoder-docstring

Conversation

@hmellor

@hmellor hmellor commented Aug 13, 2026

Copy link
Copy Markdown
Member

Purpose

The docs build emits griffe warnings for vllm/models/dots3_note/nvidia/audio_encoder.py:

WARNING - griffe: audio_encoder.py:351: Parameter 'attention_mask' does not appear in the function signature
WARNING - griffe: audio_encoder.py:353: Parameter 'layer_head_mask' does not appear in the function signature

The WhisperEncoderLayer.forward docstring was inherited from the upstream HF Whisper implementation and never updated for this layer's signature, which takes packed variable-length inputs (cu_seqlens_*, max_seqlen_*) and rotary embeddings instead of attention_mask/layer_head_mask.

This documents the parameters the method actually takes. It also corrects the return annotation, which claimed torch.Tensor while the method returns tuple[Any, ...] (hidden states, plus attention weights when output_attentions=True).

Docstring only, plus one annotation. No runtime behaviour change.

Not a duplicate

Test Plan

Run griffe's Google-style docstring parser over the module and check for warnings.

Test Result

Before:

WARNING: module.py:351: Parameter 'attention_mask' does not appear in the function signature
WARNING: module.py:353: Parameter 'layer_head_mask' does not appear in the function signature

After: no warnings.

pre-commit run --files vllm/models/dots3_note/nvidia/audio_encoder.py passes, including mypy and ruff.

No model evaluation is included because the change touches no executed code.

Note

AI assistance (Claude Code) was used for this change. I have reviewed every changed line.

🤖 Generated with Claude Code

The docstring documented `attention_mask` and `layer_head_mask`, neither
of which is in the signature, producing griffe warnings in the docs build.
Document the actual parameters and correct the return annotation, which
was `torch.Tensor` despite the method returning a tuple.

Signed-off-by: Harry Mellor <hej.mellor@gmail.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@DarkLight1337
DarkLight1337 enabled auto-merge (squash) August 13, 2026 09:05
@github-actions github-actions Bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 13, 2026
@DarkLight1337
DarkLight1337 disabled auto-merge August 13, 2026 09:05
@vllm-bot
vllm-bot merged commit 903da60 into vllm-project:main Aug 13, 2026
14 checks passed
@hmellor
hmellor deleted the fix-audio-encoder-docstring branch August 13, 2026 09:33
zyp2014 pushed a commit to zyp2014/vllm that referenced this pull request Aug 21, 2026
…llm-project#52134)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-docs ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants