saealib.OptimizationStrategy#

class saealib.OptimizationStrategy[ソース]#

ベースクラス: object

Base class for optimization strategies.

Strategies expose one canonical ComponentGraph topology. A strategy may describe it directly through build_pipeline; the default implementation recovers a facade for stage-based graphs.

Methods

__init__

build_graph

Build the strategy's canonical graph.

build_pipeline

Return the strategy's high-level Pipeline description.

contract

Return the strategy contract.

step

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)

戻り値の型:

ComponentGraph

OptimizationStrategy.build_pipeline(provider)[ソース]#

Return the strategy's high-level Pipeline description.

パラメータ:

provider (ComponentProvider)

戻り値の型:

Pipeline

OptimizationStrategy.contract()[ソース]#

Return the strategy contract.

戻り値の型:

ComponentContract

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