saealib.AcquisitionStage#
- class saealib.AcquisitionStage(acquisition, cbmanager=None)[ソース]#
ベースクラス:
StageScore offspring via an independent AcquisitionFunction.
Reads
state.offspring/state.predictions, writes the resulting score array tostate.scores.Caches
acquisition.prepare()'s result per(acquisition instance identity, generation, decision_count, archive.value_version, archive.structure_version). A stage instance running the same acquisition against an unchanged archive within one generation does not recompute the reference, while a mid-generation archive append (structure_version bump), value-only mutation (value_version bump), or a newly confirmed evaluation plan (decision_countbump -- relevant to async steady-state refill, wheregencan stay fixed across several confirmed plans) correctly invalidates it.Empty candidate input (
len(state.offspring) == 0) skips straight to an emptyAcquisitionResultwithout touching the cache or callingprepare()/evaluate(), so it never advances RNG state.- パラメータ:
acquisition (AcquisitionFunction) -- Acquisition function that scores
state.offspringagainststate.predictions.cbmanager (CallbackManager or None) -- If provided, AcquisitionStartEvent and AcquisitionEndEvent are dispatched. AcquisitionEndEvent is not dispatched if
acquisition.evaluate()raises.
Methods
Initialize base Stage attributes. |
|
Return this stage's structural and direct state-access contract. |
|
Execute this stage and return the updated state. |
|
Render this stage as a LaTeX algorithmic line. |
|
Render this stage as a plain-text algorithmic line. |
Method Details
- AcquisitionStage.__init__(acquisition, cbmanager=None)[ソース]#
Initialize base Stage attributes.
- パラメータ:
name (str, optional) -- Override the class-level
name.label (str, optional) -- Override the class-level
label.notation (str, optional) -- Override the class-level
notation.acquisition (AcquisitionFunction)
cbmanager (CallbackManager | None)
- 戻り値の型:
None
- AcquisitionStage.contract()[ソース]#
Return this stage's structural and direct state-access contract.
- 戻り値の型:
- AcquisitionStage.execute(state)[ソース]#
Execute this stage and return the updated state.
- パラメータ:
state (OptimizationState) -- Current optimization state.
- 戻り値:
Updated state.
- 戻り値の型:
OptimizationState
- AcquisitionStage.to_pseudocode(*, expand=False, indent=0)#
Render this stage as a LaTeX algorithmic line.
- パラメータ:
expand (bool) -- If True and this stage has sub-stages, recursively expand them.
indent (int) -- Current indentation level (number of
\Stateindent steps).
- 戻り値:
LaTeX algorithmic fragment.
- 戻り値の型:
str
- AcquisitionStage.to_text(*, expand=False, indent=0)#
Render this stage as a plain-text algorithmic line.
- パラメータ:
expand (bool)
indent (int)
- 戻り値の型:
str