[CI] Ignore ruff D209, rejoin the docstrings it split, and silence incompatible-rule warnings (#57212)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1085b64425
commit
651a88c09a
@@ -377,8 +377,7 @@ class BaseRenderer(ABC, Generic[_T]):
|
||||
|
||||
async def clear_mm_cache_async(self) -> None:
|
||||
"""Serialize clear_mm_cache through the multimodal executor to avoid
|
||||
races with concurrent process_inputs on the mm_processor_cache.
|
||||
"""
|
||||
races with concurrent process_inputs on the mm_processor_cache."""
|
||||
await self._clear_mm_cache_async()
|
||||
|
||||
def shutdown(self) -> None:
|
||||
|
||||
@@ -103,8 +103,7 @@ _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
|
||||
@@ -193,8 +192,7 @@ 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
|
||||
|
||||
@@ -616,8 +616,7 @@ def _convert_chat_logprobs_to_completion_logprobs(
|
||||
logprobs: ChatCompletionLogProbs,
|
||||
) -> CompletionLogProbs:
|
||||
"""Convert ChatCompletionLogProbs (per-token objects) to CompletionLogProbs
|
||||
(parallel flat lists) as required by the /v1/completions response schema.
|
||||
"""
|
||||
(parallel flat lists) as required by the /v1/completions response schema."""
|
||||
if logprobs.content is None:
|
||||
return CompletionLogProbs()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user