phenotypic.tune.strategy.SearchStrategy#

class phenotypic.tune.strategy.SearchStrategy(*args, **kwargs)[source]#

Bases: Protocol

The swappable optimizer seam: ask for params, tell results, stop on exhaustion.

Runtime-stateful (Grid cursor / Random RNG / Optuna study) → a Protocol so a test fake or a future strategy conforms structurally. result is typed Any in Phase 1b; Phase 1c narrows it to EvaluationResult.

Methods

suggest() tuple[Mapping[str, Any], PruningChannel][source]#
Return type:

tuple[Mapping[str, Any], PruningChannel]

register_result(params: Mapping[str, Any], result: Any, *, pruned: bool = False) None[source]#
Parameters:
Return type:

None

is_exhausted() bool[source]#
Return type:

bool