fix(sampler): clamp multivariate TPE candidates to parameter bounds

- Clamp KDE candidates to parameter bounds before evaluating l(x)/g(x),
  matching the univariate TPE behavior; without this, candidates scored
  well at out-of-bounds locations but became suboptimal when clamped
- Sort HashMap iterations by ParamId before consuming the seeded RNG to
  eliminate non-deterministic sampling caused by global ParamId counter
- Replace wall-clock timing assertion in async concurrency test with
  atomic max-active counter to avoid CI flakiness
- Gate unused HashSet import behind cfg(feature = "async")
This commit is contained in:
Manuel Raimann
2026-02-13 10:21:39 +01:00
parent 11a8534b38
commit 86db6361d6
5 changed files with 98 additions and 30 deletions
+1
View File
@@ -3,6 +3,7 @@
//! All tests are `#[ignore]`-gated so they don't run in normal CI.
//! Run with: `cargo test --features async -- --ignored`
#[cfg(feature = "async")]
use std::collections::HashSet;
use optimizer::parameter::{FloatParam, Parameter};