[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:
Harry Mellor
2026-09-16 10:57:24 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 1085b64425
commit 651a88c09a
693 changed files with 2088 additions and 4171 deletions
+3 -6
View File
@@ -1055,8 +1055,7 @@ CONV_EQUIV_SEQ_LENS = [[1], [7], [64], [65], [1, 2, 3], [63, 64, 65], [128, 129]
def _conv_fp32_oracle(x, weight, bias, seq_lens, activation="silu"):
"""High-precision conv reference: everything in float32, no bf16 rounding.
x: [total_tokens, dim] (no initial state). Returns [total_tokens, dim].
"""
x: [total_tokens, dim] (no initial state). Returns [total_tokens, dim]."""
xf = x.float()
wf = weight.float().unsqueeze(1)
bf = bias.float()
@@ -1165,8 +1164,7 @@ def test_conv_cpp_no_worse_than_torch_vs_fp32(seq_lens):
def test_conv_cpp_vnni_packed_matches_torch(seq_lens):
"""The exact runtime prefill sequence (VNNI-packed weight + SD-layout
conv_state view + is_vnni=True) must match the torch fallback. Validates
the packing + layout handoff on any AVX-512BF16 CPU.
"""
the packing + layout handoff on any AVX-512BF16 CPU."""
x, weight, bias = _conv_inputs(sum(seq_lens))
out_torch, _ = _run_prefill_torch(x, weight, bias, seq_lens)
out_vnni, _ = _run_prefill_cpp(x, weight, bias, seq_lens, is_vnni=True)
@@ -1180,8 +1178,7 @@ def test_conv_cpp_vnni_packed_matches_torch(seq_lens):
@torch.inference_mode()
def test_conv_update_cpp_matches_torch(batch):
"""Decode conv: causal_conv1d_update_cpu matches causal_conv1d_update_torch,
including the in-place conv_state update (the next-step handoff).
"""
including the in-place conv_state update (the next-step handoff)."""
from vllm.model_executor.layers.mamba.ops.cpu.causal_conv1d import (
causal_conv1d_update_torch,
)
@@ -122,8 +122,7 @@ def test_fallback_when_no_config(monkeypatch, tmp_path):
def test_nearest_effective_batch_interpolation(monkeypatch, tmp_path):
"""When effective_batch = batch*nheads is not an exact key, the closest
key should be selected.
"""
key should be selected."""
_write_config(
tmp_path,
dstate=32,
@@ -168,8 +167,7 @@ def test_nearest_effective_batch_interpolation(monkeypatch, tmp_path):
def test_non_dict_json_returns_none(monkeypatch, tmp_path):
"""A valid JSON file that is not a dict (e.g. a list) must be ignored
and return None rather than raising AttributeError.
"""
and return None rather than raising AttributeError."""
device_name = get_ssm_device_name()
config_path = tmp_path / get_ssm_config_file_name(
_HEADDIM, 16, _CACHE_DTYPE, device_name
@@ -191,8 +189,7 @@ def test_non_dict_json_returns_none(monkeypatch, tmp_path):
def test_empty_config_falls_back_to_heuristic(monkeypatch, tmp_path):
"""An empty JSON object {} must not crash min() — should fall back
to the hard-coded heuristic.
"""
to the hard-coded heuristic."""
_write_config(tmp_path, dstate=64, payload={})
monkeypatch.setenv("VLLM_TUNED_CONFIG_FOLDER", str(tmp_path))
@@ -68,8 +68,7 @@ def _run_prefill_decode_equivalence(
the exact fp32 recurrence (and each other). All paths use the production dt
flow (raw dt + softplus + a per-head dt_bias), so this also checks prefill
and decode apply the softplus/bias preprocessing consistently. ``state_dtype``
is the recurrent-state precision; ``act_dtype`` the activation/buffer one.
"""
is the recurrent-state precision; ``act_dtype`` the activation/buffer one."""
device = current_platform.device_type
rtol, atol = _prefill_tolerances(act_dtype)
set_random_seed(seed)
@@ -95,8 +95,7 @@ def _run_standard_decode(
) -> None:
"""Drive ``num_steps`` decode steps and check every path against the
trusted recurrence. ``state_dtype`` is the recurrent-state precision;
``act_dtype`` is the activation/buffer precision.
"""
``act_dtype`` is the activation/buffer precision."""
device = "cuda"
both_fp32 = state_dtype == torch.float32 and act_dtype == torch.float32
rtol, atol = _tolerances(torch.float32 if both_fp32 else torch.bfloat16)
@@ -540,8 +539,7 @@ def test_replayssm_standard_decode_tp_head_shard_equivalence(
separable: one run over all heads must equal concatenating ``tp`` independent
per-rank runs on ``nheads // tp`` heads and ``ngroups // tp`` groups. This
guards the per-rank divisors and group->head mapping the state-shape wiring
relies on. The real TP1==TP2 engine check lives in the v1/e2e suite.
"""
relies on. The real TP1==TP2 engine check lives in the v1/e2e suite."""
state_dtype, act_dtype = precision
nheads, headdim, dstate, ngroups = geometry
assert nheads % tp == 0 and ngroups % tp == 0