saealib.OptimizationStrategy#
- class saealib.OptimizationStrategy[ソース]#
ベースクラス:
objectBase class for optimization strategies.
Strategies expose one canonical
ComponentGraphtopology. A strategy may describe it directly throughbuild_pipeline; the default implementation recovers a facade for stage-based graphs.
Methods
Build the strategy's canonical graph. |
|
Return the strategy's high-level Pipeline description. |
|
Return the strategy contract. |
|
Perform one generation step: generate, score, evaluate, and update. |
Method Details
- OptimizationStrategy.__init__()#
- OptimizationStrategy.build_graph(provider)[ソース]#
Build the strategy's canonical graph.
Built-in strategies provide node/adapter specs to the canonical graph builder; graph-only extensions override this method and need not implement a Pipeline builder.
- パラメータ:
provider (ComponentProvider)
- 戻り値の型:
- OptimizationStrategy.build_pipeline(provider)[ソース]#
Return the strategy's high-level Pipeline description.
- パラメータ:
provider (ComponentProvider)
- 戻り値の型:
- OptimizationStrategy.step(ctx, provider)[ソース]#
Perform one generation step: generate, score, evaluate, and update.
- パラメータ:
ctx (OptimizationState) -- Current optimization context.
provider (ComponentProvider) -- Component provider.
- 戻り値:
Updated state returned by the pipeline.
- 戻り値の型:
OptimizationState