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:
Harry Mellor
2026-09-16 16:44:29 +00:00
committed by GitHub
co-authored by Claude Opus 5
parent 804e5377aa
commit 8c1557a79c
2002 changed files with 15024 additions and 14269 deletions
@@ -42,7 +42,8 @@ def _run_warmup(monkeypatch, layers) -> list[dict]:
@pytest.mark.parametrize("scale_name", ["weight_scale", "weight_scale_inv"])
def test_registered_deep_gemm_layer_is_warmed_up(monkeypatch, scale_name) -> None:
"""Any layer stamped by the DeepGEMM kernel is warmed, regardless of the
quantization method that owns it or the name of its scale parameter."""
quantization method that owns it or the name of its scale parameter.
"""
layer = _block_fp8_layer(256, 128, scale_name)
calls = _run_warmup(monkeypatch, [layer])
@@ -54,7 +55,8 @@ def test_registered_deep_gemm_layer_is_warmed_up(monkeypatch, scale_name) -> Non
def test_n_multiple_of_64_matches_kernel_selection(monkeypatch) -> None:
"""DeepGEMM accepts N % 64 == 0 (e.g. DeepSeek kv_a_proj_with_mqa, N=576),
so warmup must not require N % 128 == 0."""
so warmup must not require N % 128 == 0.
"""
assert len(_run_warmup(monkeypatch, [_block_fp8_layer(576, 256)])) == 1
@@ -71,7 +73,7 @@ def test_unstamped_and_mismatched_block_layers_are_skipped(monkeypatch) -> None:
@pytest.mark.parametrize("is_bmm", [False, True])
def test_kernel_registers_itself_as_warmup_provider(is_bmm) -> None:
"""bmm layers bypass the kernel at runtime, so they must not be warmed."""
"""Bmm layers bypass the kernel at runtime, so they must not be warmed."""
kernel = object.__new__(DeepGemmFp8BlockScaledMMKernel)
kernel.is_deep_gemm_supported = False
layer = torch.nn.Module()