feat(sp22-vnext): F-3c follow-up — K=3 CE EMA in stdout HEALTH_DIAG aux line
The F-3c commit (cdd3dc6ed) pushed `aux_trade_outcome_ce_ema` into
the regression-detection metrics vec but never wired a `tracing::
info!` console emit. Smoke `train-q5k5k` ran clean past the
rollout + post-rollout phases — but `argo logs train-q5k5k | grep
aux_trade_outcome` returned zero hits, so the operator had no way
to read the K=3 head's CE EMA trajectory.
Fix: extend the existing K=2 aux HEALTH_DIAG print
HEALTH_DIAG[N]: aux [next_bar_mse=… regime_ce=… w=…]
to include `trade_outcome_ce=…`:
HEALTH_DIAG[N]: aux [next_bar_mse=… regime_ce=…
trade_outcome_ce=… w=…]
Reads ISV[538] via the same `trainer.read_isv_signal_at(...)`
accessor the regression-detection vec uses — single source of
truth, no duplicated mirroring.
Expected operator-visible trajectory across smoke epochs:
Epoch 0 (cold-start, Pearl A sentinel): 0.000
Epoch 1+ (first non-zero bootstrap): ~1.099 (= ln(3))
Healthy learning: 0.5 - 0.7
Pinned at ln(3) for many epochs: head can't learn
cargo check -p ml clean. Audit doc updated.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5994,20 +5994,32 @@ impl DQNTrainer {
|
||||
use crate::cuda_pipeline::gpu_dqn_trainer::{
|
||||
AUX_NEXT_BAR_MSE_EMA_INDEX, AUX_REGIME_CE_EMA_INDEX,
|
||||
};
|
||||
let (aux_nb_mse, aux_rg_ce, aux_w) =
|
||||
use crate::cuda_pipeline::sp22_isv_slots::AUX_TRADE_OUTCOME_CE_EMA_INDEX;
|
||||
let (aux_nb_mse, aux_rg_ce, aux_to_ce, aux_w) =
|
||||
if let Some(ref fused) = self.fused_ctx {
|
||||
let trainer = fused.trainer();
|
||||
(
|
||||
trainer.read_isv_signal_at(AUX_NEXT_BAR_MSE_EMA_INDEX),
|
||||
trainer.read_isv_signal_at(AUX_REGIME_CE_EMA_INDEX),
|
||||
// SP22 H6 vNext Phase F-3c follow-up (2026-05-14):
|
||||
// K=3 trade-outcome head CE EMA in the existing aux
|
||||
// print line. The F-3c commit pushed this metric to
|
||||
// the regression-detection vec but never added it to
|
||||
// a `tracing::info!` line, so smoke v3 (train-q5k5k)
|
||||
// ran without operator-visible CE feedback. Cold-
|
||||
// start = 0.000 (Pearl A sentinel); after first
|
||||
// trade-close batch = ~ln(3) ≈ 1.099 (uniform
|
||||
// K=3 prior); healthy learning trajectory drops
|
||||
// toward 0.5-0.7 across epochs.
|
||||
trainer.read_isv_signal_at(AUX_TRADE_OUTCOME_CE_EMA_INDEX),
|
||||
trainer.aux_weight(),
|
||||
)
|
||||
} else {
|
||||
(0.0, 0.0, 0.0)
|
||||
(0.0, 0.0, 0.0, 0.0)
|
||||
};
|
||||
tracing::info!(
|
||||
"HEALTH_DIAG[{}]: aux [next_bar_mse={:.3e} regime_ce={:.3e} w={:.3}]",
|
||||
epoch, aux_nb_mse, aux_rg_ce, aux_w,
|
||||
"HEALTH_DIAG[{}]: aux [next_bar_mse={:.3e} regime_ce={:.3e} trade_outcome_ce={:.3e} w={:.3}]",
|
||||
epoch, aux_nb_mse, aux_rg_ce, aux_to_ce, aux_w,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,41 @@
|
||||
|
||||
**Status:** Populated during Plan 1 Task 6 (A.5 orphan audit). Updated on every commit per Invariant 7.
|
||||
|
||||
## 2026-05-14 — feat(sp22-vnext): F-3c follow-up — K=3 CE EMA in stdout HEALTH_DIAG line
|
||||
|
||||
**Branch:** `sp20-aux-h-fixed`. **Trigger:** smoke `train-q5k5k`
|
||||
ran clean past the rollout + post-rollout phases, but no
|
||||
`aux_trade_outcome_ce` value visible in any tracing log because
|
||||
the F-3c commit (`cdd3dc6ed`) only pushed the metric to the
|
||||
regression-detection vec (`metric_bands.update_and_check`), never
|
||||
added it to a `tracing::info!` console emit.
|
||||
|
||||
The F-3c commit message claimed "Operator sees CE every epoch:
|
||||
Cold-start: 0.000 / ~1.098 (= ln(3)) / ~0.5-0.7" — but `argo logs
|
||||
train-q5k5k | grep aux_trade_outcome` returned zero hits because
|
||||
the metric never reached stdout.
|
||||
|
||||
**Fix:** extend the existing K=2 aux HEALTH_DIAG print
|
||||
(`HEALTH_DIAG[N]: aux [next_bar_mse=… regime_ce=… w=…]`) to
|
||||
include `trade_outcome_ce=…`:
|
||||
|
||||
```rust
|
||||
tracing::info!(
|
||||
"HEALTH_DIAG[{}]: aux [next_bar_mse={:.3e} regime_ce={:.3e} \
|
||||
trade_outcome_ce={:.3e} w={:.3}]",
|
||||
epoch, aux_nb_mse, aux_rg_ce, aux_to_ce, aux_w,
|
||||
);
|
||||
```
|
||||
|
||||
Reads ISV[538] via the same `trainer.read_isv_signal_at(...)`
|
||||
accessor the regression-detection vec uses — single source of
|
||||
truth.
|
||||
|
||||
**Tests:** `cargo check -p ml --lib` clean.
|
||||
|
||||
**Touched:** `crates/ml/src/trainers/dqn/trainer/training_loop.rs`
|
||||
(single print-line edit + new import).
|
||||
|
||||
## 2026-05-14 — fix(sp22-vnext): K=3 aux_outcome_labels CF-half buffer underrun
|
||||
|
||||
**Branch:** `sp20-aux-h-fixed`. **Trigger:** workflow `train-xzv56`
|
||||
|
||||
Reference in New Issue
Block a user