refactor: replace TpeError with Error in the optimizer library

This commit is contained in:
Manuel Raimann
2026-01-30 19:24:58 +01:00
parent eb57519506
commit d8ef4352c3
9 changed files with 158 additions and 170 deletions
+3 -3
View File
@@ -33,7 +33,7 @@
//! study
//! .optimize_with_sampler(20, |trial| {
//! let x = trial.suggest_float("x", -10.0, 10.0)?;
//! Ok::<_, optimizer::TpeError>(x * x)
//! Ok::<_, optimizer::Error>(x * x)
//! })
//! .unwrap();
//!
@@ -86,7 +86,7 @@
//! let optimizer = trial.suggest_categorical("optimizer", &["sgd", "adam", "rmsprop"])?;
//!
//! // Return objective value
//! Ok::<_, optimizer::TpeError>(x * n as f64)
//! Ok::<_, optimizer::Error>(x * n as f64)
//! })
//! .unwrap();
//! ```
@@ -140,7 +140,7 @@ mod study;
mod trial;
mod types;
pub use error::{Result, TpeError};
pub use error::{Error, Result};
pub use param::ParamValue;
pub use study::Study;
pub use trial::Trial;