saealib.EvaluationPlanStage#
- class saealib.EvaluationPlanStage(planner=None, n_eval=None)[source]#
Bases:
StageCreate an owned request and pending record.
Increments
state.decision_countby exactly one whenever a genuinely new plan is confirmed (the branch that calls the planner and buildspending_evaluations), never on a continuation of an already-pending multi-request plan. One decision covers the whole confirmedEvaluationPlan, however many candidates its requests evaluate.decision_countcounts a genuinely new evaluation plan confirmed by the runtime regardless of execution mode: this method increments it for synchronous execution;AsyncEvaluationSubmitStage(whichexecute_async()delegates to) increments it the same way for async/steady-state execution.- Parameters:
planner (EvaluationPlanner | None)
Methods
Initialize base Stage attributes. |
|
Return this stage's structural and direct state-access contract. |
|
Execute this stage and return the updated state. |
|
Submit through the public async execution seam. |
|
Render this stage as a LaTeX algorithmic line. |
|
Render this stage as a plain-text algorithmic line. |
Method Details
- EvaluationPlanStage.__init__(planner=None, n_eval=None)[source]#
Initialize base Stage attributes.
- Parameters:
name (str, optional) – Override the class-level
name.label (str, optional) – Override the class-level
label.notation (str, optional) – Override the class-level
notation.planner (EvaluationPlanner | None)
- Return type:
None
- EvaluationPlanStage.contract()[source]#
Return this stage’s structural and direct state-access contract.
- Return type:
- EvaluationPlanStage.execute(state)[source]#
Execute this stage and return the updated state.
- Parameters:
state (OptimizationState) – Current optimization state.
- Returns:
Updated state.
- Return type:
OptimizationState
- EvaluationPlanStage.execute_async(state, *, scheduler, feedback_builder=None, algorithm=None, callback_manager=None, prefix=None, strategy=None)[source]#
Submit through the public async execution seam.
Runtime supplies lifecycle services and a prefix callback; planning and refill decisions remain owned by this stage.
- Parameters:
state (OptimizationState)
scheduler (Any)
feedback_builder (FeedbackBuilder | None)
algorithm (Any)
callback_manager (Any)
strategy (Any)
- Return type:
OptimizationState
- EvaluationPlanStage.has_async_work(state)[source]#
- Parameters:
state (OptimizationState)
- Return type:
bool
- EvaluationPlanStage.to_pseudocode(*, expand=False, indent=0)#
Render this stage as a LaTeX algorithmic line.
- Parameters:
expand (bool) – If True and this stage has sub-stages, recursively expand them.
indent (int) – Current indentation level (number of
\Stateindent steps).
- Returns:
LaTeX algorithmic fragment.
- Return type:
str
- EvaluationPlanStage.to_text(*, expand=False, indent=0)#
Render this stage as a plain-text algorithmic line.
- Parameters:
expand (bool)
indent (int)
- Return type:
str