tauopt.engine.policy.base#
Policy protocol: experiment shape -> optimizer config (the routing mechanism).
route is called PER ask, so mid-experiment strategy switching is native – a policy
is just a pure function of the current state. The open default policy ships here; the
service may run a cleverer closed router, but hosted users can always pin explicit
configs (the public config stratum).
Module Contents#
Classes#
Structural interface for routers: |
Functions#
|
API#
- class tauopt.engine.policy.base.Policy#
Bases:
typing.ProtocolStructural interface for routers:
nameandversionidentify the policy (see :func:policy_id);routepicks each ask’s config.- route(state: tauopt.engine.state.ExperimentState) tauopt.engine.config.OptimizerConfig#
Map the current experiment state to this ask’s optimizer config.
Called once per ask, so mid-experiment strategy switching is native; implementations must be pure functions of
stateso routed asks stay deterministic (P4).
- tauopt.engine.policy.base.policy_id(policy: tauopt.engine.policy.base.Policy) str#
name@versionidentity string, recorded in provenance aspolicy.