saealib.OptimizationStrategy#
- class saealib.OptimizationStrategy[source]#
Bases:
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)[source]#
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.
- Parameters:
provider (ComponentProvider)
- Return type:
- OptimizationStrategy.build_pipeline(provider)[source]#
Return the strategy’s high-level Pipeline description.
- Parameters:
provider (ComponentProvider)
- Return type:
- OptimizationStrategy.step(ctx, provider)[source]#
Perform one generation step: generate, score, evaluate, and update.
- Parameters:
ctx (OptimizationState) – Current optimization context.
provider (ComponentProvider) – Component provider.
- Returns:
Updated state returned by the pipeline.
- Return type:
OptimizationState