Files
foxhunt/ml/examples
jgrusewski 41114c12ff feat(ml): wire PPO/TFT/Mamba2 training in retrain_all_models
Replace three placeholder stubs that returned Err("pending") with
working implementations that create real trainers and run actual
training loops:

- train_ppo: Creates PpoTrainer with conservative defaults,
  loads market data as state vectors, runs PPO training with
  progress callback, saves checkpoint metadata

- train_mamba2: Creates Mamba2Trainer with validated hyperparams,
  generates training/validation tensor pairs, runs MAMBA-2
  sequence training, collects training statistics

- train_tft: Creates TFTTrainer with FileSystemStorage, attempts
  Parquet data loading first with synthetic data fallback,
  runs TFT training with OOM retry support

Also fixes 10 pre-existing compilation errors:
- Import PPOHyperparameters/PPOTrainer -> PpoHyperparameters/PpoTrainer
- Import TFTHyperparameters -> TFTTrainerConfig (correct type name)
- ModelType::LIQUID -> ModelType::LNN (correct enum variant)
- DQNHyperparameters struct literal -> conservative() with overrides
- checkpoint_manager.config() -> direct PathBuf construction
- DQN checkpoint callback 2-arg -> 3-arg (epoch, data, is_best)
- opts partial move -> clone version_tag before unwrap_or_else
- Add catch-all arm for exhaustive ModelType matching
- Add FileSystemStorage import for TFT trainer construction
- Prefix unused variables with underscore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21 19:28:57 +01:00
..