Add pydocstyle to the ruff rules (#52136)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Signed-off-by: Harry Mellor <hej.mellor@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -132,8 +132,7 @@ def _get_max_soft_tokens(
|
||||
|
||||
|
||||
class Gemma4ImagePixelInputs(TensorSchema):
|
||||
"""
|
||||
Pre-patchified image inputs from the Gemma4 image processor.
|
||||
"""Pre-patchified image inputs from the Gemma4 image processor.
|
||||
|
||||
Dimensions:
|
||||
- bn: Batch size * number of images
|
||||
@@ -159,11 +158,10 @@ class Gemma4ImagePixelInputs(TensorSchema):
|
||||
|
||||
|
||||
class Gemma4AudioInputs(TensorSchema):
|
||||
"""
|
||||
Dimensions:
|
||||
- bn: Batch size * number of audios
|
||||
- s: Sequence length (MEL spectrogram frames)
|
||||
- f: Number of features (MEL bins)
|
||||
"""Dimensions:
|
||||
- bn: Batch size * number of audios
|
||||
- s: Sequence length (MEL spectrogram frames)
|
||||
- f: Number of features (MEL bins)
|
||||
"""
|
||||
|
||||
type: Literal["audio"] = "audio"
|
||||
@@ -304,9 +302,12 @@ class Gemma4ProcessingInfo(BaseProcessingInfo):
|
||||
for an image of the given dimensions, after padding is stripped.
|
||||
|
||||
Args:
|
||||
image_width: Width of the image in pixels.
|
||||
image_height: Height of the image in pixels.
|
||||
max_soft_tokens: Override for the vision config's
|
||||
``default_output_length``. When *None*, the value from
|
||||
the model config is used.
|
||||
|
||||
"""
|
||||
vision_cfg = self.get_hf_config().vision_config
|
||||
patch_size = vision_cfg.patch_size
|
||||
@@ -345,8 +346,12 @@ class Gemma4ProcessingInfo(BaseProcessingInfo):
|
||||
produce after stripping padding.
|
||||
|
||||
Args:
|
||||
image_width: Width of the image in pixels.
|
||||
image_height: Height of the image in pixels.
|
||||
processor: The Gemma4 processor, when already constructed.
|
||||
max_soft_tokens: Override for the default token budget.
|
||||
When *None*, falls back to the model config value.
|
||||
|
||||
"""
|
||||
if processor is None:
|
||||
processor = self.get_hf_processor()
|
||||
|
||||
Reference in New Issue
Block a user