diff --git a/src/lib.rs b/src/lib.rs index a7c507e..9ce87ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -55,9 +55,9 @@ //! | [`RandomSampler`](sampler::RandomSampler) | Uniform random | Baselines, high-dimensional | — | //! | [`TpeSampler`](sampler::TpeSampler) | Tree-Parzen Estimator | General-purpose Bayesian | — | //! | [`GridSearchSampler`](sampler::GridSampler) | Exhaustive grid | Small, discrete spaces | — | -//! | [`SobolSampler`](sampler::SobolSampler) | Sobol quasi-random sequence | Space-filling, low dimensions | `sobol` | -//! | [`CmaEsSampler`](sampler::CmaEsSampler) | CMA-ES | Continuous, moderate dimensions | `cma-es` | -//! | [`GpSampler`](sampler::GpSampler) | Gaussian Process + EI | Expensive objectives, few trials | `gp` | +//! | `SobolSampler` | Sobol quasi-random sequence | Space-filling, low dimensions | `sobol` | +//! | `CmaEsSampler` | CMA-ES | Continuous, moderate dimensions | `cma-es` | +//! | `GpSampler` | Gaussian Process + EI | Expensive objectives, few trials | `gp` | //! | [`DESampler`](sampler::DESampler) | Differential Evolution | Non-convex, population-based | — | //! | [`BohbSampler`](sampler::BohbSampler) | BOHB (TPE + `HyperBand`) | Budget-aware early stopping | — | //! @@ -74,13 +74,13 @@ //! //! | Flag | What it enables | Default | //! |------|----------------|---------| -//! | `async` | Async/parallel optimization via tokio ([`Study::optimize_async`], [`Study::optimize_parallel`]) | off | +//! | `async` | Async/parallel optimization via tokio (`Study::optimize_async`, `Study::optimize_parallel`) | off | //! | `derive` | `#[derive(Categorical)]` for enum parameters | off | -//! | `serde` | `Serialize`/`Deserialize` on public types, [`Study::save`]/[`Study::load`] | off | -//! | `journal` | [`JournalStorage`](storage::JournalStorage) — JSONL persistence with file locking (enables `serde`) | off | -//! | `sobol` | [`SobolSampler`](sampler::SobolSampler) — quasi-random low-discrepancy sequences | off | -//! | `cma-es` | [`CmaEsSampler`](sampler::CmaEsSampler) — Covariance Matrix Adaptation Evolution Strategy | off | -//! | `gp` | [`GpSampler`](sampler::GpSampler) — Gaussian Process surrogate with Expected Improvement | off | +//! | `serde` | `Serialize`/`Deserialize` on public types, `Study::save`/`Study::load` | off | +//! | `journal` | `JournalStorage` — JSONL persistence with file locking (enables `serde`) | off | +//! | `sobol` | `SobolSampler` — quasi-random low-discrepancy sequences | off | +//! | `cma-es` | `CmaEsSampler` — Covariance Matrix Adaptation Evolution Strategy | off | +//! | `gp` | `GpSampler` — Gaussian Process surrogate with Expected Improvement | off | //! | `tracing` | Structured log events via [`tracing`](https://docs.rs/tracing) at key optimization points | off | /// Emit a `tracing::info!` event when the `tracing` feature is enabled. diff --git a/src/sampler/de.rs b/src/sampler/de.rs index 274078a..57ded49 100644 --- a/src/sampler/de.rs +++ b/src/sampler/de.rs @@ -29,9 +29,9 @@ //! - **No feature flags required** — DE is available with default features. //! //! For non-separable problems in moderate dimensions, consider -//! [`CmaEsSampler`](super::cma_es::CmaEsSampler) which learns parameter +//! `CmaEsSampler` which learns parameter //! correlations. For expensive functions with few dimensions, consider -//! [`GpSampler`](super::gp::GpSampler). +//! `GpSampler`. //! //! # Configuration //! diff --git a/src/sampler/random.rs b/src/sampler/random.rs index 2850376..22036b7 100644 --- a/src/sampler/random.rs +++ b/src/sampler/random.rs @@ -15,7 +15,7 @@ //! surprisingly competitive. //! //! For better uniform coverage without model fitting, consider -//! [`SobolSampler`](super::sobol::SobolSampler) (requires the `sobol` +//! `SobolSampler` (requires the `sobol` //! feature flag). //! //! # Example diff --git a/src/sampler/tpe/multivariate/trials.rs b/src/sampler/tpe/multivariate/trials.rs index e1d31c9..6e1f00d 100644 --- a/src/sampler/tpe/multivariate/trials.rs +++ b/src/sampler/tpe/multivariate/trials.rs @@ -116,7 +116,7 @@ impl MultivariateTpeSampler { /// Splits filtered trials into good and bad groups based on the gamma quantile. /// - /// The gamma value is computed dynamically using the configured [`GammaStrategy`]. + /// The gamma value is computed dynamically using the configured [`super::GammaStrategy`]. /// Trials are sorted by objective value (ascending for minimization), and the /// gamma quantile determines the split point. #[allow( diff --git a/src/storage/mod.rs b/src/storage/mod.rs index 1ed6357..d0e32a0 100644 --- a/src/storage/mod.rs +++ b/src/storage/mod.rs @@ -9,12 +9,12 @@ //! | Backend | Description | Feature flag | //! |---------|-------------|-------------| //! | [`MemoryStorage`] | In-memory `Vec` behind a read-write lock (the default) | — | -//! | [`JournalStorage`] | JSONL file with `fs2` file locking for multi-process sharing | `journal` | +//! | `JournalStorage` | JSONL file with `fs2` file locking for multi-process sharing | `journal` | //! //! # When to swap backends //! //! The default [`MemoryStorage`] is sufficient for single-process studies -//! where persistence is not needed. Switch to [`JournalStorage`] when you +//! where persistence is not needed. Switch to `JournalStorage` when you //! want to: //! //! - **Resume** a study after a process restart. @@ -59,7 +59,7 @@ use crate::sampler::CompletedTrial; /// a plain `Vec` behind a read-write lock. /// /// Implementations must be `Send + Sync` because a study may be shared -/// across threads (e.g. via [`optimize_parallel`](crate::Study::optimize_parallel)). +/// across threads (e.g. via `Study::optimize_parallel`). pub trait Storage: Send + Sync { /// Append a completed trial to the store. fn push(&self, trial: CompletedTrial); diff --git a/src/study/export.rs b/src/study/export.rs index 62c6368..0db9ef9 100644 --- a/src/study/export.rs +++ b/src/study/export.rs @@ -224,7 +224,7 @@ where impl Study { /// Export trials as a pretty-printed JSON array to a file. /// - /// Each element in the array is a serialized [`CompletedTrial`]. + /// Each element in the array is a serialized [`crate::CompletedTrial`]. /// Requires the `serde` feature. /// /// # Errors diff --git a/src/study/mod.rs b/src/study/mod.rs index f2981c5..00948c1 100644 --- a/src/study/mod.rs +++ b/src/study/mod.rs @@ -225,7 +225,7 @@ where /// /// This is the most general constructor — all other constructors /// delegate to this one. Use it when you need a non-default storage - /// backend (e.g., [`JournalStorage`](crate::storage::JournalStorage)). + /// backend (e.g., `JournalStorage`). /// /// # Arguments ///