hyperopt-rs 0.1.0

hyperopt-rs: an Optuna-shaped hyperparameter optimization framework for Rust. Ergonomic facade over the hyperopt-core/samplers/pruners/storage crates.
Documentation

hyperopt

hyperopt-rs — an Optuna-shaped hyperparameter optimization framework for Rust. This is the ergonomic facade crate: it re-exports the core types and every sampler, pruner, and storage backend, and adds a [StudyBuilder] so a study can be assembled in one fluent expression.

use hyperopt_rs::prelude::*;

# fn main() -> Result<(), HyperoptError> {
let study = StudyBuilder::new("quadratic")
    .direction(Direction::Minimize)
    .sampler(TpeSampler::seeded(42))
    .build()?;

study.optimize(|trial| {
    let x = trial.suggest_float("x", -10.0, 10.0);
    let y = trial.suggest_float("y", -10.0, 10.0);
    Ok((x - 2.0).powi(2) + (y + 3.0).powi(2))
}, 200)?;

println!("best = {:?}", study.best_trial()?);
# Ok(()) }