Files
foxhunt/crates/ml-alpha/src/lib.rs
jgrusewski 6a46ded7d3 feat(rl): module skeleton for integrated RL trainer (Phase A)
Adds crates/ml-alpha/src/rl/{mod,common,isv_slots}.rs scaffolding
for the integrated RL trainer per the plan at
docs/superpowers/plans/2026-05-22-integrated-rl-trainer.md.

Phase A lands only the module structure + Transition struct +
12 ISV slot constants (400-411). Subsequent phases (B-H) wire the
encoder gradient hookup, DQN/PPO heads, training loop, Argo
workflow, and backtest gate.

Per pearl_controller_anchors_isv_driven and
feedback_isv_for_adaptive_bounds, every adaptive hyperparameter
documented in the slot constants is sourced from ISV (not from
hardcoded const). Controller kernels (producers) land in phases
C/D/E/F.
2026-05-22 22:20:51 +02:00

55 lines
1.7 KiB
Rust

//! ml-alpha — CfC perception + multi-horizon alpha heads.
//!
//! Phase A (this crate): snapshot-level CfC trunk + 5 horizon heads,
//! trained supervised on MBP-10 with multi-horizon BCE. The CfC trunk
//! must beat the Mamba2 baseline (`mamba2_block`) at every horizon
//! before Phase B (PPO) is allowed to start.
//!
//! All hot-path arithmetic runs on GPU. The crate owns no CPU compute
//! on model tensors. See `docs/superpowers/specs/2026-05-16-ml-alpha-cfc-ppo-design.md`.
#![warn(clippy::all)]
#![allow(
clippy::module_name_repetitions,
clippy::cast_precision_loss,
clippy::cast_possible_truncation,
clippy::missing_errors_doc
)]
// Module declarations are added as each task lands its source.
// Tasks 3-17 progressively turn these on.
// Task 3: pub mod isv;
// Task 4: pub mod pinned;
// Task 5+: pub mod cfc;
// Task 7+: pub mod heads;
// Task 10+: pub mod trainer;
// Task 12: pub mod data;
// Task 16+: pub mod gate;
pub mod aux_heads;
pub mod cfc;
pub mod data;
pub mod eval;
pub mod heads;
pub mod isv;
pub mod pinned;
pub mod pinned_mem;
#[cfg(feature = "kernel-step-trace")]
pub mod gpu_log;
pub mod rl;
pub mod trainer;
// Preserved from prior crate state — used by Phase A.
pub mod fxcache_reader;
pub mod purged_split;
pub mod multi_horizon_labels;
// Gate reference only — Mamba2 baseline against which CfC must compete.
pub mod mamba2_block;
pub use isv::IsvBus;
pub use multi_horizon_labels::{generate_labels, LongHorizonLabels};
// Re-exports added as the relevant tasks land:
// pub use cfc::CfcTrunk;
// pub use heads::{MultiHorizonHeads, Projection};
// pub use pinned::{MappedPinnedSnapshotSlot, MappedPinnedFillSlot};