Files
foxhunt/crates/ml
jgrusewski c65d6228f4 fix: CUDA stack size for curiosity kernel + cuda default feature + remove candle deps
Three fixes:
1. cuCtxSetLimit(STACK_SIZE, 4096) in GpuCuriosityTrainer::new() — the
   fused kernel needs ~3KB/thread (6 arrays of 42-128 floats), default
   1024B causes stack overflow → async crash → stream deadlock

2. ml crate default features restored to ["minimal-inference", "cuda"]
   — was ["minimal-inference"] only, causing #[cfg(not(feature="cuda"))]
   gates to fire and block GPU code paths

3. Removed candle-core, candle-nn, candle-optimisers from ml/Cargo.toml
   dependencies — Candle was eliminated from source but deps remained.
   NOTE: 322 candle references remain in ml/src/ — next commit migrates them.

4. Re-enabled curiosity in smoke test (curiosity_weight back to default)

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

ml

10-model ML ensemble for the Foxhunt HFT system, built on Candle v0.9.1.

Models

  • DQN (Rainbow) — deep Q-network with prioritized replay, dueling heads, noisy nets
  • PPO — proximal policy optimization with GAE, LSTM policies, clip-higher
  • TFT — temporal fusion transformer for multi-horizon forecasting
  • Mamba2 — state space model for sequence prediction
  • Liquid Networks — biologically inspired networks for non-stationary data
  • TLOB — transformer-based limit order book analysis
  • KAN — Kolmogorov-Arnold networks
  • xLSTM — extended LSTM architecture
  • TGGN — temporal graph neural network
  • Diffusion — diffusion-based generative model

Key Modules

  • ensemble — model ensemble coordination and confidence aggregation
  • hyperopt — PSO-based hyperparameter optimization with per-model adapters
  • trainers — unified training loops (DQN, PPO, supervised)
  • inferenceInferenceAdapter trait for prediction
  • checkpoint — model checkpointing and restoration
  • evaluation — walk-forward evaluation pipeline

Usage

use ml::dqn::DQN;
use ml::ppo::PpoTrainer;