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:
Harry Mellor
2026-09-16 16:44:29 +00:00
committed by GitHub
co-authored by Claude Opus 5
parent 804e5377aa
commit 8c1557a79c
2002 changed files with 15024 additions and 14269 deletions
+8 -8
View File
@@ -73,12 +73,11 @@ from .vision import (
class SiglipImagePixelInputs(TensorSchema):
"""
Dimensions:
- bn: Batch size * number of images
- c: Number of channels (3)
- h: Height of each image
- w: Width of each image
"""Dimensions:
- bn: Batch size * number of images
- c: Number of channels (3)
- h: Height of each image
- w: Width of each image
"""
type: Literal["pixel_values"]
@@ -399,7 +398,7 @@ class SiglipAttention(nn.Module):
self,
hidden_states: torch.Tensor,
) -> tuple[torch.Tensor, None]:
"""Input shape: Batch x Time x Channel"""
"""Input shape: Batch x Time x Channel."""
qkv_states, _ = self.qkv_proj(hidden_states)
query_states, key_states, value_states = qkv_states.chunk(3, dim=-1)
out = self.attn(query_states, key_states, value_states)
@@ -778,8 +777,9 @@ class SiglipVisionTransformer(nn.Module):
"""Apply the post layer norm and head if they are enabled,
given the last hidden states tensor.
args:
Args:
encoder_outputs: The last hidden states from the visual encoder.
"""
if self.post_layernorm is not None:
encoder_outputs = self.post_layernorm(encoder_outputs)