Files
foxhunt/crates
jgrusewski 319554b02e fix(dqn): TensorId gradient clipping fallback, 45-action tracking, small-GPU OOM guard
- gradient_utils: Add TensorId-based fallback when Var identity mismatch
  causes 0/N vars to match GradStore (Candle Adam clones Arcs). Fallback
  computes norm AND clips via insert_id. Throttled warning (1st + every
  1000th). 7 unit tests including mismatch-actually-clips.

- monitoring: Track full 45-action factored space (5 exposure × 3 order
  × 3 urgency). Fix validate_rewards false alarm on GPU path where single
  aggregated mean_reward per epoch gives N=1 → std=0.

- trainer: GPU experience collection routes exposure actions through
  route_action() for factored tracking instead of exposure-only counts.
  Applied in both per-step and epoch-summary paths.

- train_baseline_rl: Auto-detect VRAM <8GB → disable GPU replay buffer
  to prevent OOM on RTX 3050 Ti class GPUs.

- smoke_test_real_data: E2E DQN training test with 6 assertions (epoch
  completion, loss decrease, finite losses, Q-value divergence, 45-action
  space, finite gradient norms).

Validated: 1642 tests pass (ml=915, ml-core=311, ml-dqn=416), 0 clippy
warnings, baseline RL trains 10 epochs on CUDA with Sharpe +5.45.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:15:48 +01:00
..