[Docs] Fix WhisperEncoderLayer.forward docstring in dots3_note - #52134
Merged
Conversation
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>
DarkLight1337
approved these changes
Aug 13, 2026
DarkLight1337
enabled auto-merge (squash)
August 13, 2026 09:05
DarkLight1337
disabled auto-merge
August 13, 2026 09:05
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
The docs build emits griffe warnings for
vllm/models/dots3_note/nvidia/audio_encoder.py:The
WhisperEncoderLayer.forwarddocstring 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 ofattention_mask/layer_head_mask.This documents the parameters the method actually takes. It also corrects the return annotation, which claimed
torch.Tensorwhile the method returnstuple[Any, ...](hidden states, plus attention weights whenoutput_attentions=True).Docstring only, plus one annotation. No runtime behaviour change.
Not a duplicate
gh pr list --state open --search "griffe docstring parameter"returns only [CI/Build] Fix strict docs build: annotate _to_serve_args parameter #51342, which fixes an unrelated annotation invllm/benchmarks/throughput.py.gh pr list --state open --search "dots3_note audio_encoder"returns nothing.Test Plan
Run griffe's Google-style docstring parser over the module and check for warnings.
Test Result
Before:
After: no warnings.
pre-commit run --files vllm/models/dots3_note/nvidia/audio_encoder.pypasses, includingmypyandruff.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