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
+5 -2
View File
@@ -227,6 +227,7 @@ class ViTPatchGenerator(nn.Module):
Returns:
Embedded patches with temporal compression applied.
"""
assert self.temporal_patch_size > 1
T = self.temporal_patch_size
@@ -598,7 +599,8 @@ class RadioInternVisionModel(nn.Module):
self, imgs_sizes: list[tuple[int, int]], device: torch.device
) -> MaskMetadata:
"""Build mask metadata from image pixel sizes. Adds num_skip to each
sequence length (cls/register tokens) to match patch generator output."""
sequence length (cls/register tokens) to match patch generator output.
"""
patch_size = self.patch_generator.patch_size
num_skip = self.patch_generator.num_skip
@@ -611,7 +613,8 @@ class RadioInternVisionModel(nn.Module):
) -> MaskMetadata:
"""Build mask metadata from actual sequence lengths (already including
cls/register tokens, i.e. patch_count + num_skip per item).
Use inter_image_mask_metadata() when you only have imgs_sizes."""
Use inter_image_mask_metadata() when you only have imgs_sizes.
"""
assert len(seq_lens) > 0
cu_seqlens = torch.tensor(
list(accumulate(seq_lens, initial=0)), dtype=torch.int32, device=device