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
@@ -89,13 +89,12 @@ class InternS1MultiModalProjector(nn.Module):
|
||||
|
||||
|
||||
class InternS1ImagePixelInputs(TensorSchema):
|
||||
"""
|
||||
Dimensions:
|
||||
- bnp: Batch size * number of images * (1 + num_patches)
|
||||
- c: Number of channels (3)
|
||||
- h: Height
|
||||
- w: Width
|
||||
- bn: Batch size * number of images
|
||||
"""Dimensions:
|
||||
- bnp: Batch size * number of images * (1 + num_patches)
|
||||
- c: Number of channels (3)
|
||||
- h: Height
|
||||
- w: Width
|
||||
- bn: Batch size * number of images
|
||||
"""
|
||||
|
||||
type: Literal["pixel_values"] = "pixel_values"
|
||||
@@ -104,11 +103,10 @@ class InternS1ImagePixelInputs(TensorSchema):
|
||||
|
||||
|
||||
class InternS1ImageEmbeddingInputs(TensorSchema):
|
||||
"""
|
||||
Dimensions:
|
||||
- ni: Number of images
|
||||
- tifs: Total image feature size
|
||||
- hs: Hidden size (must match language model backbone)
|
||||
"""Dimensions:
|
||||
- ni: Number of images
|
||||
- tifs: Total image feature size
|
||||
- hs: Hidden size (must match language model backbone)
|
||||
"""
|
||||
|
||||
type: Literal["image_embeds"] = "image_embeds"
|
||||
@@ -119,13 +117,12 @@ InternS1ImageInputs: TypeAlias = InternS1ImagePixelInputs | InternS1ImageEmbeddi
|
||||
|
||||
|
||||
class InternS1VideoPixelInputs(TensorSchema):
|
||||
"""
|
||||
Dimensions:
|
||||
- bnv: Batch size * number of videos * number of frames
|
||||
- bn: Batch size * number of images
|
||||
- c: Number of channels (3)
|
||||
- h: Height
|
||||
- w: Width
|
||||
"""Dimensions:
|
||||
- bnv: Batch size * number of videos * number of frames
|
||||
- bn: Batch size * number of images
|
||||
- c: Number of channels (3)
|
||||
- h: Height
|
||||
- w: Width
|
||||
"""
|
||||
|
||||
type: Literal["pixel_values_videos"] = "pixel_values_videos"
|
||||
@@ -134,11 +131,10 @@ class InternS1VideoPixelInputs(TensorSchema):
|
||||
|
||||
|
||||
class InternS1VideoEmbeddingInputs(TensorSchema):
|
||||
"""
|
||||
Dimensions:
|
||||
- nv: Number of videos
|
||||
- tvfs: Total video feature size
|
||||
- hs: Hidden size (must match language model backbone)
|
||||
"""Dimensions:
|
||||
- nv: Number of videos
|
||||
- tvfs: Total video feature size
|
||||
- hs: Hidden size (must match language model backbone)
|
||||
"""
|
||||
|
||||
type: Literal["video_embeds"] = "video_embeds"
|
||||
@@ -862,9 +858,7 @@ class InternS1ForConditionalGeneration(
|
||||
return loader.load_weights(weights, mapper=self.hf_to_vllm_mapper)
|
||||
|
||||
def get_mm_mapping(self) -> MultiModelKeys:
|
||||
"""
|
||||
Get the module prefix in multimodal models
|
||||
"""
|
||||
"""Get the module prefix in multimodal models."""
|
||||
return MultiModelKeys.from_string_field(
|
||||
language_model="language_model",
|
||||
connector="multi_modal_projector",
|
||||
|
||||
Reference in New Issue
Block a user