[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
@@ -68,8 +68,7 @@ class _StubEngineCoreActor(EngineCoreActorMixin):
|
||||
# in ``tests/entrypoints/test_api_server_process_manager.py``.
|
||||
def _bind_and_report_worker(listen_address, sock, args, client_config):
|
||||
"""Bind ROUTER/PULL with a kernel-assigned port, report the actual
|
||||
endpoints back via ``actual_address_pipe``, then exit.
|
||||
"""
|
||||
endpoints back via ``actual_address_pipe``, then exit."""
|
||||
ctx = zmq.Context()
|
||||
try:
|
||||
in_sock = make_zmq_socket(
|
||||
|
||||
@@ -607,8 +607,7 @@ def _cadenced_dp_engine_core(
|
||||
monkeypatch, results: list[tuple[bool, bool]], dp_sync_interval: int = 32
|
||||
):
|
||||
"""A bare DPEngineCoreProc whose all-reduce is scripted by `results`;
|
||||
returns the core and the step numbers at which the all-reduce ran.
|
||||
"""
|
||||
returns the core and the step numbers at which the all-reduce ran."""
|
||||
core = object.__new__(DPEngineCoreProc)
|
||||
core.dp_group = object()
|
||||
core.dp_sync_interval = dp_sync_interval
|
||||
@@ -627,8 +626,7 @@ def _cadenced_dp_engine_core(
|
||||
|
||||
def test_dp_sync_interval_default_is_16():
|
||||
"""Regression pin: lowering the default narrows the mid-wave pause tail
|
||||
for async RL, where the engine is rarely idle when pause lands.
|
||||
"""
|
||||
for async RL, where the engine is rarely idle when pause lands."""
|
||||
assert ParallelConfig.dp_sync_interval == 16
|
||||
|
||||
|
||||
@@ -646,8 +644,7 @@ def test_dp_sync_interval_normal_wave(monkeypatch, dp_sync_interval: int):
|
||||
def test_dp_sync_interval_idle_pause_consensus_on_first_step(monkeypatch):
|
||||
"""A pause of an idle engine arms every rank before its kick-started
|
||||
first step, so the step-1 sync reaches consensus after one dummy batch
|
||||
regardless of the configured cadence.
|
||||
"""
|
||||
regardless of the configured cadence."""
|
||||
core, synced = _cadenced_dp_engine_core(
|
||||
monkeypatch, [(False, True)], dp_sync_interval=32
|
||||
)
|
||||
@@ -673,8 +670,7 @@ def _pausable_engine_core_proc() -> EngineCoreProc:
|
||||
@pytest.mark.parametrize("deferred", [False, True])
|
||||
def test_pause_synchronizes_device_before_cache_reset(deferred: bool):
|
||||
"""A resolved pause promises an idle device: the barrier must run before
|
||||
caches are cleared and before the caller is unblocked.
|
||||
"""
|
||||
caches are cleared and before the caller is unblocked."""
|
||||
core = _pausable_engine_core_proc()
|
||||
core.engines_running = deferred
|
||||
order: list[str] = []
|
||||
|
||||
@@ -249,8 +249,7 @@ def test_dplb_non_late_interaction_still_uses_lb():
|
||||
|
||||
def test_dplb_burst_round_robins_despite_snapshot_rebinds():
|
||||
"""A stats snapshot rebind wipes the optimistic lb_engines increments;
|
||||
the exact in-flight floor must keep a burst spreading round-robin.
|
||||
"""
|
||||
the exact in-flight floor must keep a burst spreading round-robin."""
|
||||
client = _make_dplb_client(num_engines=4)
|
||||
|
||||
for _ in range(4):
|
||||
@@ -325,8 +324,7 @@ async def test_dplb_scale_down_routes_after_stale_stats_snapshot():
|
||||
|
||||
def test_dplb_snapshot_backpressure_overrides_inflight():
|
||||
"""An engine reported heavily loaded by the coordinator is avoided even
|
||||
when this client has routed nothing to it.
|
||||
"""
|
||||
when this client has routed nothing to it."""
|
||||
client = _make_dplb_client(num_engines=2)
|
||||
client.lb_engines = [[5, 10, 0.0], [0, 0, 0.0]]
|
||||
|
||||
@@ -339,8 +337,7 @@ def test_dplb_snapshot_backpressure_overrides_inflight():
|
||||
|
||||
def test_dplb_kv_pressure_amplifies_waiting_penalty():
|
||||
"""A waiting queue on a KV-bound engine (slow drain) is penalized, while
|
||||
the same queue with low KV usage is not (e.g. transient burst).
|
||||
"""
|
||||
the same queue with low KV usage is not (e.g. transient burst)."""
|
||||
client = _make_dplb_client(num_engines=2)
|
||||
# Engine 0 has a smaller total but is KV-bound with a queue.
|
||||
client.lb_engines = [[5, 10, 1.0], [0, 20, 0.2]]
|
||||
|
||||
@@ -30,8 +30,7 @@ def _make_processor(num_logprobs: int) -> LogprobsProcessor:
|
||||
|
||||
def test_drops_trailing_sentinel_columns():
|
||||
"""A request that asked for 3 custom token logprobs but ended up in a
|
||||
batch padded to width 5 must not surface the trailing -inf entries.
|
||||
"""
|
||||
batch padded to width 5 must not surface the trailing -inf entries."""
|
||||
processor = _make_processor(num_logprobs=3)
|
||||
|
||||
sampled = 42
|
||||
|
||||
@@ -229,8 +229,7 @@ def test_request_stream_interval_raises_but_not_below_engine_default(
|
||||
):
|
||||
"""A per-request stream_interval can raise the interval above the engine
|
||||
default but not below it (values under the default clamp up), without
|
||||
altering the generated text.
|
||||
"""
|
||||
altering the generated text."""
|
||||
engine_stream_interval = 5
|
||||
# Request 0 (below the default) clamps up to 5; request 1 raises it to 10.
|
||||
request_stream_intervals = [1, 10]
|
||||
|
||||
Reference in New Issue
Block a user