[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
@@ -232,8 +232,7 @@ class TestShouldSkipWeight:
|
||||
|
||||
class TestSafetensorsWeightsIteratorWithEpFilter:
|
||||
"""Verify that EP filtering produces a strict subset of unfiltered loading
|
||||
and that all expected dense + local expert weights are present.
|
||||
"""
|
||||
and that all expected dense + local expert weights are present."""
|
||||
|
||||
@pytest.fixture(scope="class")
|
||||
def gpt2_files(self):
|
||||
@@ -263,8 +262,7 @@ class TestSafetensorsWeightsIteratorWithEpFilter:
|
||||
|
||||
def test_empty_filter_skips_experts_only(self, gpt2_files):
|
||||
"""GPT-2 has no expert weights, so even an empty local_expert_ids
|
||||
set should return all weights (all are dense).
|
||||
"""
|
||||
set should return all weights (all are dense)."""
|
||||
all_weights = dict(safetensors_weights_iterator(gpt2_files, False))
|
||||
filtered_weights = dict(
|
||||
safetensors_weights_iterator(gpt2_files, False, local_expert_ids=set())
|
||||
@@ -275,8 +273,7 @@ class TestSafetensorsWeightsIteratorWithEpFilter:
|
||||
|
||||
class TestEpFilterOnSyntheticMoeWeights:
|
||||
"""Create synthetic safetensors files with expert-like naming and verify
|
||||
that the filter correctly skips non-local experts.
|
||||
"""
|
||||
that the filter correctly skips non-local experts."""
|
||||
|
||||
@pytest.fixture
|
||||
def synthetic_moe_files(self, tmp_path):
|
||||
|
||||
@@ -350,8 +350,7 @@ def test_marlin_post_load_preserves_runtime_tensor_addresses(monkeypatch, dist_i
|
||||
@pytest.mark.parametrize("variant", ["fp8", "mxfp8", "nvfp4"])
|
||||
def test_marlin_prepare_layer_preserves_workspace_address(monkeypatch, variant):
|
||||
"""The Marlin fallback prepare_* functions rerun on weight reload and must
|
||||
reuse the workspace storage whose address captured CUDA graphs hold.
|
||||
"""
|
||||
reuse the workspace storage whose address captured CUDA graphs hold."""
|
||||
from vllm import _custom_ops as ops
|
||||
from vllm.model_executor.layers.quantization.utils import (
|
||||
marlin_utils,
|
||||
@@ -429,8 +428,7 @@ def test_marlin_prepare_layer_preserves_workspace_address(monkeypatch, variant):
|
||||
|
||||
def test_marlin_make_workspace_new_rejects_incompatible_existing(monkeypatch):
|
||||
"""An incompatible existing workspace means the address captured by CUDA
|
||||
graphs is already unusable; allocating a replacement would hide that.
|
||||
"""
|
||||
graphs is already unusable; allocating a replacement would hide that."""
|
||||
from vllm.model_executor.layers.quantization.utils import marlin_utils
|
||||
|
||||
monkeypatch.setattr(marlin_utils, "num_compute_units", lambda _: 4)
|
||||
@@ -611,8 +609,7 @@ class _RecordingQuantMethod(QuantizeMethodBase):
|
||||
class _LateBiasLayer(torch.nn.Module):
|
||||
"""Mimics an online-quantized linear: `weight` is created on meta by
|
||||
`create_weights()`, which wraps the loaders, and the linear base registers
|
||||
`bias` afterwards.
|
||||
"""
|
||||
`bias` afterwards."""
|
||||
|
||||
def __init__(self, quant_method):
|
||||
super().__init__()
|
||||
|
||||
Reference in New Issue
Block a user