1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! SONA Tuning Integration - Self-Optimizing Threshold Learning
//!
//! This module provides integration with the `sona` crate for adaptive threshold
//! learning in the coherence engine. SONA (Self-Optimizing Neural Architecture)
//! enables the coherence gate thresholds to adapt based on operational experience.
//!
//! # Architecture
//!
//! The SONA integration provides three learning loops:
//!
//! 1. **Instant Loop** (Micro-LoRA): Ultra-low latency (<0.05ms) adaptation
//! 2. **Background Loop** (Base-LoRA): Deeper learning in background threads
//! 3. **Coordination Loop**: Synchronizes instant and background learning
//!
//! # Key Types
//!
//! - [`SonaThresholdTuner`]: Main adapter for threshold learning
//! - [`ThresholdConfig`]: Threshold configuration for compute lanes
//! - [`ThresholdAdjustment`]: Recommended threshold changes
//! - [`TunerConfig`]: Configuration for the SONA integration
//!
//! # Example
//!
//! ```rust,ignore
//! use prime_radiant::sona_tuning::{SonaThresholdTuner, TunerConfig};
//!
//! // Create threshold tuner
//! let mut tuner = SonaThresholdTuner::new(TunerConfig::default());
//!
//! // Begin tracking a new regime
//! let builder = tuner.begin_regime(&energy_trace);
//!
//! // After observing outcome, learn from it
//! tuner.learn_outcome(builder, success_score);
//!
//! // Query for similar past configurations
//! if let Some(config) = tuner.find_similar_regime(¤t_energy) {
//! // Apply recommended thresholds
//! }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;