jgrusewski
57bae2cb68
fix(ml): OOM hardening + battle-test KAN/xLSTM/Diffusion models
Replace 8 unbounded Vec accumulation patterns with bounded VecDeque
across ensemble, PPO, DQN, Mamba2, and data pipeline code to prevent
OOM on RTX 3050 Ti (4GB VRAM) during live trading and extended training.
Key OOM fixes:
- Ensemble price/volatility history: Vec → VecDeque with O(1) eviction
- Data pipeline: MAX_FEATURES=500K cap (~512MB) prevents unbounded loading
- DQN replay buffer: full-array shuffle → HashSet random sampling (8MB → 256B)
- PPO loss histories: bounded VecDeque (cap 1K), eliminated batch.clone()
- Mamba2 scan: pre-allocated Vecs, explicit drop() after Tensor::cat
- Mamba2 training history: capped at 100, Tensor::randn replaces Vec→Tensor
- Mamba2 SSM reset: 2 unwrap() violations replaced with proper error handling
Battle-testing (19 new integration tests):
- KAN: 5 tests (forward, 50-epoch training 89.9% loss reduction, checkpoint)
- xLSTM: 7 tests (2D+3D forward, 30-epoch training 82% reduction, checkpoint)
- Diffusion: 7 tests (2D+3D forward, 20-epoch pipeline, checkpoint, validation)
Bonus: fix pre-existing cache test failure (match .dbn.zst files, graceful skip)
All 2390 lib tests pass, 0 new clippy errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:55:39 +01:00
..
2026-02-20 13:08:10 +01:00
2026-02-20 13:21:25 +01:00
2026-02-20 14:39:58 +01:00
2026-02-20 14:44:44 +01:00
2026-02-20 20:49:41 +01:00
2026-02-24 00:30:15 +01:00
2026-02-20 20:03:10 +01:00
2026-02-20 19:56:20 +01:00
2026-02-20 21:53:45 +01:00
2026-02-20 21:59:14 +01:00
2026-02-24 00:30:15 +01:00
2026-02-24 00:30:15 +01:00
2026-02-21 15:21:22 +01:00
2026-02-21 15:30:00 +01:00
2026-02-21 10:33:54 +01:00
2026-02-21 10:39:54 +01:00
2026-02-21 14:58:36 +01:00
2026-02-21 14:58:36 +01:00
2026-02-21 13:19:17 +01:00
2026-02-24 00:30:15 +01:00
2026-02-21 15:18:19 +01:00
2026-02-21 15:25:17 +01:00
2026-02-24 00:30:15 +01:00
2026-02-21 10:23:48 +01:00
2026-02-21 18:53:38 +01:00
2026-02-21 19:00:43 +01:00
2026-02-21 20:21:01 +01:00
2026-02-21 20:21:01 +01:00
2026-02-21 23:06:50 +01:00
2026-02-21 23:06:50 +01:00
2026-02-24 00:30:15 +01:00
2026-02-24 00:30:15 +01:00
2026-02-21 15:04:58 +01:00
2026-02-24 00:30:15 +01:00
2026-02-24 00:30:15 +01:00
2026-02-22 19:54:53 +01:00
2026-02-22 20:01:12 +01:00
2026-02-24 00:30:15 +01:00
2026-02-24 00:30:15 +01:00
2026-02-24 00:30:15 +01:00
2026-02-24 00:30:15 +01:00
2026-02-24 00:30:15 +01:00
2026-02-24 00:30:15 +01:00
2026-02-22 23:56:38 +01:00
2026-02-24 00:30:15 +01:00
2026-02-24 00:30:15 +01:00
2026-02-22 22:33:08 +01:00
2026-02-22 22:51:56 +01:00
2026-02-22 22:51:56 +01:00
2026-02-22 22:51:56 +01:00
2026-02-23 12:28:02 +01:00
2026-02-23 12:36:45 +01:00
2026-02-23 10:53:04 +01:00
2026-02-23 10:56:45 +01:00
2026-02-23 00:05:28 +01:00
2026-02-23 12:02:52 +01:00
2026-02-23 12:11:28 +01:00
2026-02-23 09:33:55 +01:00
2026-02-23 09:39:13 +01:00
2026-02-23 14:43:22 +01:00
2026-02-23 14:59:18 +01:00
2026-02-23 18:51:54 +01:00
2026-02-23 19:00:29 +01:00
2026-02-23 18:07:03 +01:00
2026-02-23 18:07:03 +01:00
2026-02-23 14:17:22 +01:00
2026-02-23 14:21:48 +01:00
2026-02-24 09:55:39 +01:00