Files
foxhunt/crates
jgrusewski 33ce35bdeb feat: walk-forward out-of-sample smoke tests + best_sharpe in metrics
Walk-forward validation tests:
- test_walk_forward_oos_metrics: 10 epochs, asserts finite OOS Sharpe,
  non-zero val_loss (validation backtest ran), positive gradient norm
- test_walk_forward_no_overfitting_50_epochs: 50 epochs, asserts val_loss
  doesn't catastrophically worsen (> -100), model retains generalization

Metrics additions:
- best_sharpe, best_val_loss, best_epoch added to TrainingMetrics
  (were on trainer struct but not returned to callers)

Defensive NaN guard restored in loss kernels:
- fast_isfinite check on per-sample weighted_loss
- Remaining NaN source: bf16 reward storage in replay buffer (TODO: convert
  reward path to float at boundary, same pattern as experience features)
- Guard clearly documented as temporary with TODO

Results: 895/895 unit + 11/11 smoke tests (9 original + 2 walk-forward).
Walk-forward 10ep: best_sharpe=5.32, best_val_loss=-0.45 (positive OOS Sharpe).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 01:28:12 +01:00
..