refactor(examples): split multi-concept examples into focused single-topic files

- Split pruning_and_callbacks into pruning and early_stopping
- Split advanced_features into async_parallel, journal_storage, ask_and_tell, multi_objective
- Each example now requires only its own feature flag
- Trim sampler_comparison winner logic and verbose header
- Update CI workflow and README to match new example names
This commit is contained in:
Manuel Raimann
2026-02-12 10:33:51 +01:00
parent 6a4b27c46f
commit ee59c9cdd0
12 changed files with 376 additions and 443 deletions
+9 -5
View File
@@ -52,11 +52,15 @@ println!("Best x = {:.4}, f(x) = {:.4}", best.get(&x).unwrap(), best.value);
## Examples
```sh
cargo run --example basic_optimization # Minimize a quadratic — simplest possible usage
cargo run --example sampler_comparison # Compare Random, TPE, and Grid on the same problem
cargo run --example pruning_and_callbacks # Trial pruning with MedianPruner + early stopping
cargo run --example parameter_types --features derive # All 5 param types + #[derive(Categorical)]
cargo run --example advanced_features --features async,journal # Async, journal storage, ask-and-tell, multi-objective
cargo run --example basic_optimization # Minimize a quadratic — simplest possible usage
cargo run --example parameter_types --features derive # All 5 param types + #[derive(Categorical)]
cargo run --example sampler_comparison # Compare Random, TPE, and Grid on the same problem
cargo run --example pruning # Trial pruning with MedianPruner
cargo run --example early_stopping # Halt a study when a target is reached
cargo run --example async_parallel --features async # Evaluate trials concurrently with tokio
cargo run --example journal_storage --features journal # Persist trials to disk and resume later
cargo run --example ask_and_tell # Decouple sampling from evaluation
cargo run --example multi_objective # Optimize competing objectives + Pareto front
```
## Learn More