Commit Graph

6 Commits

Author SHA1 Message Date
jgrusewski
aa19b42255 refactor(ml): move UnifiedTrainable to ml-core + delete 6K dead deployment code
- Move UnifiedTrainable trait, TrainingMetrics, CheckpointMetadata, and
  checkpoint helpers from ml to ml-core (zero new dependencies — ml-core
  already had candle-core + serde_json)
- Wrap Mamba2SSM in Mamba2TrainableAdapter to satisfy orphan rule (trait
  in ml-core, type in ml-supervised — all other 9 models already used
  wrapper pattern)
- Make Mamba2SSM::validate() pub for cross-crate adapter access
- Delete 5 permanently disabled deployment modules (cfg(any()) — never
  compiled): registry, hot_swap, validation, monitoring, endpoints
  (-5,842 lines)
- Delete 2 undeclared dead files in training/: dqn_trainer.rs,
  transformer_trainer.rs (-138 lines)
- Fix pre-existing compute_loss test shape mismatch in mamba adapter

UnifiedTrainable in ml-core unblocks future trainers/ extraction (17.8K
lines) since model-specific trainers can now depend on ml-core for the
trait without pulling in the full ml monolith.

14 files changed, +128 -6,497 (net -6,369 lines)
Tests: 274 ml-core + 948 ml = 1,222 passed, 0 failed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:17:22 +01:00
jgrusewski
29f36bb1d6 docs(ml): clarify edge-case comments from final review
- ab_testing: clarify champion_dd == 0 drawdown semantics
- online_learning: document compute_fisher independent-loss requirement
- curriculum: document disabled-vs-override precedence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 09:26:53 +01:00
jgrusewski
921c9309e9 fix(ml): address final review findings — rename, mutability, bounds
- Rename SlippageModel trait → MarketImpactModel to avoid name collision
  with PPO's SlippageModel enum
- Wrap ThompsonSamplingState in std::sync::Mutex for interior mutability
  through Arc, enabling record_outcome during inference
- Add TrafficSplitter::record_outcome() method for callers
- Cap RegimeDetectionEngine::feature_data to window_size*3 entries
- Add trailing newline to ab_testing.rs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 05:23:31 +01:00
jgrusewski
30dbce211a feat(ml): add Thompson Sampling and Bayesian promotion to A/B testing
Extends TrafficSplitter with Thompson Sampling (Beta-distributed traffic
allocation) and PromotionCriteria for automated champion/challenger
decisions. 18 tests, 0 clippy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 05:09:12 +01:00
jgrusewski
561e2bd299 fix: repair broken use statement in ml/deployment/endpoints.rs
The #[instrument] import was incorrectly inserted inside a `use super {}`
block by the previous commit, causing syntax errors.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 00:55:51 +01:00
jgrusewski
9c3d741a08 refactor: restructure repo — crates/, bin/, testing/ layout
Move 17 library crates into crates/, CLI binary into bin/fxt,
consolidate 10 test crates into testing/, split config crate
from deployment config files.

Root directory reduced from 38+ to ~17 directories.
All Cargo.toml paths and build.rs proto refs updated.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 11:56:00 +01:00