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
+1 -17
View File
@@ -40,10 +40,7 @@ fn run_study(study: Study<f64>, n_trials: usize) -> f64 {
fn main() {
let n_trials: usize = 100;
println!("Comparing samplers on Sphere(x, y) = x² + y²");
println!(" Search space: x ∈ [-5, 5], y ∈ [-3, 3]");
println!(" Known minimum: f(0, 0) = 0");
println!(" Trials per sampler: {n_trials}");
println!("Comparing samplers on Sphere(x, y) = x² + y² ({n_trials} trials each)");
println!();
// --- Random sampler (baseline) ---
@@ -78,17 +75,4 @@ fn main() {
println!(" Random : {random_best:.6}");
println!(" TPE : {tpe_best:.6}");
println!(" Grid : {grid_best:.6}");
println!();
// Find the winner
let results = [
("Random", random_best),
("TPE", tpe_best),
("Grid", grid_best),
];
let (winner, _) = results
.iter()
.min_by(|a, b| a.1.partial_cmp(&b.1).unwrap())
.unwrap();
println!("Winner: {winner} (closest to known minimum of 0.0)");
}