phenotypic.tune.strategy.RandomStrategy#
- class phenotypic.tune.strategy.RandomStrategy(space: SearchSpace, *, n_trials: int, seed: int = 0)[source]#
Bases:
objectSamples
n_trialsrandom configurations under a fixed seed.Respects
conditional_on: a child knob is sampled only when its parent presence value was sampled to match. Relies on a parent presence knob appearing before its conditional children inspace.knobs(true for inferred and hand-authored spaces — the__enabled__knob is emitted first); a topological pass is unnecessary at the depth-cap of 1.- Parameters:
space (SearchSpace) – The search space to sample over.
n_trials (int) – The number of configurations to draw before exhaustion.
seed (int) – The RNG seed; fixing it makes the sampled sequence deterministic.
Methods
__init__- suggest() tuple[Mapping[str, Any], PruningChannel][source]#
- Return type:
tuple[Mapping[str, Any], PruningChannel]