regression
regression
¶
Per-cluster regression detection for the benchmark gate.
After an edit is applied, the gate compares the before and after
BenchmarkSnapshots. If any cluster's score dropped by more than
max_regression, the edit is rejected.
See spec §7.3.
Classes¶
RegressionResult
dataclass
¶
Functions¶
regression_check
¶
regression_check(before: BenchmarkSnapshot, after: BenchmarkSnapshot, max_regression: float = 0.05) -> RegressionResult
Check if any cluster regressed beyond the threshold.
| PARAMETER | DESCRIPTION |
|---|---|
before
|
Benchmark snapshot before the edit.
TYPE:
|
after
|
Benchmark snapshot after the edit.
TYPE:
|
max_regression
|
Maximum allowed per-cluster score drop (default 0.05).
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
RegressionResult
|
|