//! DQN (Deep Q-Network) Trainer Module
//!
//! Production-ready DQN training pipeline that:
//! - Loads real market data from DBN files
//! - Trains on GPU (RTX 3050 Ti, 4GB VRAM)
//! - Saves checkpoints to MinIO every 10 epochs
//! - Returns comprehensive training metrics
//! - Validates batch sizes for GPU memory limits
//!
//! ## Module Structure
//!
//! - `config` - Hyperparameters and agent type configuration
//! - `data_loading` - Parquet/DBN data loading and preprocessing
//! - `early_stopping` - Patience-based early stopping mechanism (WAVE 24)
//! - `features` - Feature extraction, statistics, and normalization
//! - `monitoring` - Per-epoch training monitor and validation
//! - `risk` - Adaptive risk management (volatility epsilon, Kelly criterion)
//! - `statistics` - Feature normalization and Q-value monitoring
//! - `trainer` - Main DQNTrainer implementation (core training loop)

mod config;
mod data_loading;
mod early_stopping;
pub mod expert_demos;
pub(crate) mod financials;
mod features;
mod fused_training;
pub mod lr_scheduler;
mod monitoring;
mod risk;
mod statistics;
mod trainer;
mod smoke_tests;

// Re-export all public items for backward compatibility
pub use config::{DQNAgentType, DQNHyperparameters};
pub use early_stopping::EarlyStopping;
pub use lr_scheduler::{LRDecayType, LRScheduler};
pub use statistics::{FeatureStatistics, QValueStats};
pub use trainer::DQNTrainer;

// Re-export constants
pub const EPISODE_LENGTH: usize = 200;

// Re-export type aliases (42 market + 3 portfolio = 45 state)
pub type FeatureVector = [f64; 45];
/// Market-only feature vector (deprecated alias — use FeatureVector from features::extraction instead)
pub type FeatureVector51 = [f64; 42];
