[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
@@ -334,8 +334,7 @@ def _aiter_moe_fused_shared_experts_enabled(
|
||||
|
||||
class MiniMaxM3MoE(nn.Module):
|
||||
"""Sigmoid-routed MoE block with a routing-bias correction and a shared
|
||||
expert.
|
||||
"""
|
||||
expert."""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
@@ -173,8 +173,7 @@ class MiniMaxM3IndexerPrefillMetadata:
|
||||
@dataclass
|
||||
class MiniMaxM3IndexerDecodeMetadata:
|
||||
"""Per-decode state (cudagraph-safe). ``decode_query_len`` is the uniform
|
||||
per-request query length (1, or 1 + num_speculative_tokens).
|
||||
"""
|
||||
per-request query length (1, or 1 + num_speculative_tokens)."""
|
||||
|
||||
seq_lens: torch.Tensor # [num_decodes] int32
|
||||
block_table: torch.Tensor
|
||||
@@ -207,8 +206,7 @@ class MiniMaxM3IndexerMetadataBuilder(
|
||||
AttentionMetadataBuilder[MiniMaxM3IndexerMetadata]
|
||||
):
|
||||
"""Abstract base: shared setup only. The Triton and MSA builders are
|
||||
parallel subclasses that each own their full ``build`` (no shared code).
|
||||
"""
|
||||
parallel subclasses that each own their full ``build`` (no shared code)."""
|
||||
|
||||
# Full cudagraphs for uniform decode batches (incl. spec-decode verify).
|
||||
_cudagraph_support: ClassVar[AttentionCGSupport] = AttentionCGSupport.UNIFORM_BATCH
|
||||
|
||||
@@ -203,8 +203,7 @@ class MiniMaxM3SparsePrefillMetadata:
|
||||
@dataclass
|
||||
class MiniMaxM3SparseDecodeMetadata:
|
||||
"""Per-decode state (cudagraph-safe). ``decode_query_len`` is the uniform
|
||||
per-request query length (1, or 1 + num_speculative_tokens).
|
||||
"""
|
||||
per-request query length (1, or 1 + num_speculative_tokens)."""
|
||||
|
||||
seq_lens: torch.Tensor # [num_decodes] int32
|
||||
block_table: torch.Tensor
|
||||
|
||||
@@ -85,8 +85,7 @@ class MiniMaxM3IndexerMSAPrefillMetadata:
|
||||
class MiniMaxM3IndexerMSAMetadata(MiniMaxM3IndexerMetadata):
|
||||
"""Decode reuses the inherited base ``decode`` field (the Triton decode
|
||||
metadata); ``prefill_msa`` carries the fmha score plan for the prefill side
|
||||
(the base ``prefill`` field is unused on this path).
|
||||
"""
|
||||
(the base ``prefill`` field is unused on this path)."""
|
||||
|
||||
prefill_msa: MiniMaxM3IndexerMSAPrefillMetadata | None = None
|
||||
# Per-forward view (``[:num_tokens]``) of the builder's persistent unified
|
||||
@@ -112,8 +111,7 @@ class MiniMaxM3IndexerMSAMetadata(MiniMaxM3IndexerMetadata):
|
||||
|
||||
class MiniMaxM3IndexerMSAMetadataBuilder(MiniMaxM3IndexerMetadataBuilder):
|
||||
"""Decode metadata is the cudagraph-safe Triton decode metadata; the prefill
|
||||
fmha plan is built eagerly (prefill batches are not captured).
|
||||
"""
|
||||
fmha plan is built eagerly (prefill batches are not captured)."""
|
||||
|
||||
_cudagraph_support: ClassVar[AttentionCGSupport] = AttentionCGSupport.UNIFORM_BATCH
|
||||
|
||||
|
||||
@@ -190,8 +190,7 @@ class MiniMaxM3MLP(nn.Module):
|
||||
|
||||
class MiniMaxM3MoE(nn.Module):
|
||||
"""Sigmoid-routed MoE block with a routing-bias correction and a shared
|
||||
expert.
|
||||
"""
|
||||
expert."""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -783,8 +782,7 @@ class MiniMaxM3DecoderLayer(nn.Module):
|
||||
@property
|
||||
def ffn_all_reduce_deferred(self) -> bool:
|
||||
"""This layer's FFN output is left un-reduced; the caller fuses the
|
||||
all-reduce into the next RMSNorm.
|
||||
"""
|
||||
all-reduce into the next RMSNorm."""
|
||||
if self.is_moe_layer:
|
||||
return self.block_sparse_moe.experts.moe_config.skip_final_all_reduce
|
||||
return not self.mlp.down_proj.reduce_results
|
||||
|
||||
Reference in New Issue
Block a user