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
@@ -91,7 +91,8 @@ def validate_image_sentinel_ids(tokenizer) -> None:
|
||||
|
||||
def grid_tokens(best_height, best_width, patch_size, downsample_ratio):
|
||||
"""Number of LLM tokens the aligner grid occupies (N-layout, including
|
||||
row/align padding)."""
|
||||
row/align padding).
|
||||
"""
|
||||
n_llm_h = math.ceil((best_height // patch_size) / downsample_ratio)
|
||||
n_llm_w = math.ceil((best_width // patch_size) / downsample_ratio)
|
||||
num_tokens = n_llm_h * (n_llm_w + 1) + 2
|
||||
@@ -196,7 +197,8 @@ def load_image(
|
||||
|
||||
def build_image_block(n_llm_h: int, n_llm_w: int, start_pos: int):
|
||||
"""Builds the N-layout token types (final order) and the aligner-row order
|
||||
for IMAGE slots."""
|
||||
for IMAGE slots.
|
||||
"""
|
||||
compress_pad = COMPRESS_PAD_TO - 1 - start_pos % COMPRESS_PAD_TO
|
||||
pad_h = n_llm_h % 2
|
||||
rows = n_llm_h + pad_h
|
||||
@@ -239,7 +241,8 @@ def build_image_block_pad_free(n_llm_h: int, n_llm_w: int):
|
||||
|
||||
class DeepseekV4VLImageProcessor:
|
||||
"""Per-image transform (the PIL-input equivalent of the reference
|
||||
``load_image``)."""
|
||||
``load_image``).
|
||||
"""
|
||||
|
||||
def __init__(self, config: DeepseekV4Config) -> None:
|
||||
super().__init__()
|
||||
|
||||
Reference in New Issue
Block a user