gds_psuu.optimizers¶
Search strategy implementations.
Base¶
Abstract base class for optimizers.
Optimizer
¶
Bases: ABC
Base class for parameter search optimizers.
Subclasses implement the suggest/observe loop. The optimizer is stateful and mutable — it tracks which points have been evaluated and uses that information to decide what to try next.
Source code in packages/gds-psuu/gds_psuu/optimizers/base.py
Grid Search¶
Grid search optimizer — exhaustive cartesian product search.
GridSearchOptimizer
¶
Bases: Optimizer
Evaluates every point in a regular grid over the parameter space.
For Continuous dimensions, n_steps evenly spaced values are used.
For Integer dimensions, all integers in [min, max] are used.
For Discrete dimensions, all values are used.
Source code in packages/gds-psuu/gds_psuu/optimizers/grid.py
Random Search¶
Random search optimizer — uniform random sampling.
RandomSearchOptimizer
¶
Bases: Optimizer
Samples parameter points uniformly at random.
Uses stdlib random.Random for reproducibility — no numpy required.
When the parameter space has constraints, uses rejection sampling
with a configurable retry limit.
Source code in packages/gds-psuu/gds_psuu/optimizers/random.py
Bayesian (optional)¶
Bayesian optimizer — wraps optuna (optional dependency).
BayesianOptimizer
¶
Bases: Optimizer
Bayesian optimization using optuna's TPE sampler.
Requires optuna. Install with::
uv add gds-psuu[bayesian]
Optimizes a single target KPI (by default the first one registered).