//! Hyperparameter Optimization Library
//!
//! Production-ready hyperparameter optimization using argmin (PSO) and TPE.
//!
//! This crate provides:
//! - **Argmin Optimization**: Derivative-free optimization using Particle Swarm
//! - **TPE**: Tree-Parzen Estimator for Bayesian optimization
//! - **Latin Hypercube Sampling**: Smart initialization for exploration
//! - **Early Stopping**: Plateau detection, median pruning, percentile pruning
//! - **Sensitivity Analysis**: Fragility detection for hyperparameter robustness
//!
//! Model-specific adapters (DQN, PPO, TFT, Mamba2, etc.) live in the `ml` crate's
//! `hyperopt::adapters` module and depend on this crate for core infrastructure.

#![deny(clippy::unwrap_used, clippy::expect_used)]
#![cfg_attr(test, allow(clippy::unwrap_used, clippy::expect_used))]
#![allow(clippy::module_name_repetitions)]
#![allow(clippy::integer_division)]
#![allow(clippy::doc_markdown)]
#![allow(clippy::float_arithmetic)]
#![allow(clippy::partial_pub_fields)] // ML config structs: some fields are pub API, some internal
#![allow(clippy::shadow_reuse, clippy::shadow_same, clippy::shadow_unrelated)] // Common in optimization code
#![allow(clippy::non_ascii_literal)] // Math symbols in optimization documentation
#![allow(clippy::same_name_method)] // Intentional: inherent methods shadow trait defaults
#![allow(clippy::indexing_slicing)]
#![allow(clippy::missing_const_for_fn)]
#![allow(clippy::non_ascii_literal)]
#![allow(clippy::shadow_reuse)]
#![allow(clippy::shadow_unrelated)]
#![allow(clippy::shadow_same)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(unused_crate_dependencies)]

pub use ml_core::{MLError, MLResult};

pub mod early_stopping;
pub mod observer;
pub mod optimizer;
pub mod paths;
pub mod sensitivity;
pub mod tpe;
pub mod traits;

// Re-exports for convenience
pub use observer::TrialBudgetObserver;
pub use optimizer::{optimize_with_tpe, ArgminOptimizer, ArgminOptimizerBuilder, TwoPhaseObjective};
pub use traits::{
    HardwareBudget, HyperoptStrategy, HyperparameterOptimizable, ObjectiveMode,
    OptimizationResult, ParameterSpace, TrialResult,
};
