Module llm_policy

Module llm_policy 

Source
Expand description

Shared policy parser/compiler for online LLM backends.

Structs§

CompiledPolicy
Compiled, position-resolved policy ready for runtime evaluation.
LlmPolicy
Parsed policy specification for online LLM adaptation.
OptimizerHyperParams
Hyper-parameters attached to a training action.
PolicyRule
Interval schedule rule (start..end:action).
PolicyRuntime
Stateful cursor over a CompiledPolicy.
RepeatRule
Repeat schedule rule with cycle period and inner pattern.
RepeatSegment
One segment inside a repeating pattern.
TrainAction
Concrete training directive.
TrainScopeSet
Canonical set of train scopes (all, none, or sorted named scopes).

Enums§

OptimizerKind
Optimizer family selected by a train action.
PolicyAction
Action emitted by the policy at each stream position.
PositionExpr
Position expression used in policy schedules.
ScheduleRule
Top-level schedule rule.

Functions§

parse_policy_segment
Parse a policy:... string into LlmPolicy.
policy_can_train
Returns true if any schedule branch can emit a training action.
split_method_policy_segments
Split method into base method segment and optional policy:... segment.