Space-filling sweeps (Sobol, Latin Hypercube)
Space-filling sweeps (Sobol, Latin Hypercube)
When grid is too dense and adaptive search is too goal-directed, quasi-Monte-Carlo (QMC) sweeps draw a fixed budget of variations that cover the parameter space evenly. Use them for characterization — getting a representative scatter you can plot — rather than optimization.
When to use which
Default to Sobol unless you have all-discrete dims or want exact per-bin balance.
Use case 1 — Perf surface across realistic input shapes
64 samples × 3 trials = 192 cells. A 5⁴ grid would be 625 cells — you save ~70% with comparable scatter coverage.
Use case 2 — A/B build comparison on a fixed workload distribution
Run identical YAML on build A, then build B. The same seed makes Sobol pick identical 32 points both runs, giving you paired comparisons — much better variance than independent sweeps.
Use case 3 — Latin Hypercube on discrete dims
LHS guarantees each model appears samples / len(choices) times — its niche over Sobol when all dims are discrete.
Reproducibility
Every QMC run writes <artifacts>/sweep_aggregate/sampling_design.json containing the mapped sample values (samples_mapped), the dimension specs, the sampler type/seed, and sampler options (scramble for Sobol, optimization for LHS). Re-runs with the same seed and scipy version produce byte-identical points. Pin scipy in pyproject.toml if you need cross-machine reproducibility over time.
Edge cases
See also
- Bayesian-Optimization Outer Loop — when you want optimization, not characterization
- Bayesian Optimization — 1D SLA saturation — single-dim ramp recipe (
max-concurrency-under-sla/max-goodput-under-slo) - Search Recipes — high-level recipes that build sweeps from intent