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:
co-authored by
Claude Opus 5
parent
804e5377aa
commit
8c1557a79c
@@ -139,7 +139,8 @@ def _find_matching_targets(
|
||||
|
||||
class OnlineQuantizationConfig(QuantizationConfig):
|
||||
"""Model-level config for online quantization (quantize fp16/bf16 weights
|
||||
during model loading, without requiring a pre-quantized checkpoint)."""
|
||||
during model loading, without requiring a pre-quantized checkpoint).
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@@ -227,6 +228,7 @@ class OnlineQuantizationConfig(QuantizationConfig):
|
||||
Returns:
|
||||
The matching method class, or None when ``spec`` has no weight
|
||||
quantization.
|
||||
|
||||
"""
|
||||
if spec is None or spec.weight is None:
|
||||
return None
|
||||
@@ -260,6 +262,7 @@ class OnlineQuantizationConfig(QuantizationConfig):
|
||||
A tuple of source, quantization key string, target pattern, spec,
|
||||
and method class. Returns None when online quantization does not
|
||||
apply to the layer.
|
||||
|
||||
"""
|
||||
quant_spec: QuantSpec | None
|
||||
if self.args.targets is not None:
|
||||
@@ -313,6 +316,7 @@ class OnlineQuantizationConfig(QuantizationConfig):
|
||||
A tuple of source, quantization key string, target pattern, spec,
|
||||
and dispatch table. Returns None when no pattern applies or the
|
||||
layer is ignored.
|
||||
|
||||
"""
|
||||
assert self.args.targets is not None
|
||||
ignored = should_ignore_layer(
|
||||
|
||||
Reference in New Issue
Block a user