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
@@ -103,7 +103,8 @@ _TOKENIZE_OVERRIDE_WARNING: Final[str] = (
|
||||
|
||||
def _ensure_prompt_embeds_placeholder_token(tokenizer: HfTokenizer) -> int:
|
||||
"""Register `PROMPT_EMBEDS_PLACEHOLDER_TOKEN` as a special token and return
|
||||
its token ID."""
|
||||
its token ID.
|
||||
"""
|
||||
cached = _PROMPT_EMBEDS_PLACEHOLDER_TOKEN_ID_CACHE.get(tokenizer)
|
||||
if cached is not None:
|
||||
return cached
|
||||
@@ -192,7 +193,8 @@ def _build_mixed_prompt_embeds(
|
||||
positions: list[tuple[int, int]],
|
||||
) -> tuple[torch.Tensor, list[bool]]:
|
||||
"""Build the full-length `prompt_embeds` tensor and the `is_token_ids`
|
||||
mask aligned to `token_ids`."""
|
||||
mask aligned to `token_ids`.
|
||||
"""
|
||||
total_len = len(token_ids)
|
||||
hidden_size = prompt_embeds_tensors[0].shape[1]
|
||||
dtype = prompt_embeds_tensors[0].dtype
|
||||
@@ -900,6 +902,7 @@ def rebuild_mm_uuids_from_mm_data(
|
||||
|
||||
Returns:
|
||||
Updated UUIDs dictionary with chunk UUIDs
|
||||
|
||||
"""
|
||||
vision_chunks = mm_data.get("vision_chunk")
|
||||
if vision_chunks is None:
|
||||
@@ -932,6 +935,7 @@ def build_video_prompts_from_mm_data(
|
||||
|
||||
Returns:
|
||||
List of video prompts, one per video.
|
||||
|
||||
"""
|
||||
vision_chunks = mm_data.get("vision_chunk")
|
||||
if vision_chunks is None:
|
||||
|
||||
Reference in New Issue
Block a user