From c0fee5a9bf4566b69e6bb76abb4c8a8a47c3f32f Mon Sep 17 00:00:00 2001 From: jgrusewski Date: Wed, 22 Apr 2026 11:27:18 +0200 Subject: [PATCH] =?UTF-8?q?docs(smoke):=20magnitude=5Fdistribution=20?= =?UTF-8?q?=E2=80=94=20replace=20H9-delete=20references=20with=20fix-path?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per standing rule feedback_no_functionality_removal.md: never propose deleting the magnitude branch as a fallback. Updated the Task 2.2 regression-assertion comments + assertion message to point at the actual follow-up fixes if the eh+ef≥0.30 gate fails: - per-magnitude reward shaping - per-bin advantage weighting - magnitude curriculum - state-vector enrichment No semantic change to the test (still asserts eh+ef≥0.30); only the guidance comments were reframed. --- .../dqn/smoke_tests/magnitude_distribution.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/crates/ml/src/trainers/dqn/smoke_tests/magnitude_distribution.rs b/crates/ml/src/trainers/dqn/smoke_tests/magnitude_distribution.rs index a5d094acd..a8116a176 100644 --- a/crates/ml/src/trainers/dqn/smoke_tests/magnitude_distribution.rs +++ b/crates/ml/src/trainers/dqn/smoke_tests/magnitude_distribution.rs @@ -58,16 +58,20 @@ fn test_magnitude_distribution() -> Result<()> { // after the Philox tie-break fix the eval argmax samples tied indices // uniformly, so eh + ef should approach training-time magnitude spread. // Threshold 0.30 is the user-specified gate from Task 2.9 (`eval_dist eh + ef ≥ 0.3`). - // Do NOT relax — failure here means the H10 fix alone is insufficient and - // the H9 fallback (delete magnitude branch) may need to promote to primary. + // Do NOT relax — failure here means the magnitude branch isn't yet differentiating + // Quarter / Half / Full enough to warrant the branch's existence. Follow-up fixes + // (per-magnitude reward shaping, per-bin advantage weighting, magnitude curriculum, + // state-vector enrichment) are scoped to make the branch useful. Per + // feedback_no_functionality_removal.md, the branch is never deleted as a fallback. let [eq, eh, ef] = trainer.last_eval_magnitude_dist(); println!("[EVAL_DIST] Quarter={:.3} Half={:.3} Full={:.3}", eq, eh, ef); assert!( eh + ef >= 0.30, "H10 regression: eval Half + Full share {:.3} < 0.30 (eq={:.3} eh={:.3} ef={:.3}) \ — argmax tie-break did not prevent collapse. Train-mode dist_mag should show \ - similar spread; if training dist is also low, the H9 fallback (delete magnitude \ - branch) may be needed.", + similar spread; if training dist is also low, the next fix step is \ + per-magnitude reward shaping / per-bin advantage weighting / curriculum — \ + make the magnitude branch useful, not remove it.", eh + ef, eq, eh, ef ); Ok(())