execution_strategy¶
execution_strategy ¶
Execution strategy abstraction for different execution modes.
Implements Strategy pattern to support sync, async, and streaming execution without modifying core pipeline logic.
ExecutionStrategy ¶
Bases: ABC
Abstract base for execution strategies.
Follows Strategy pattern: defines interface for executing pipeline stages in different modes (sync, async, streaming).
execute
abstractmethod
¶
execute(stages: list[PipelineStage], context: ExecutionContext) -> ExecutionResult | Iterator[pd.DataFrame] | AsyncIterator[pd.DataFrame]
Execute pipeline stages.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
stages
|
list[PipelineStage]
|
List of pipeline stages to execute |
required |
context
|
ExecutionContext
|
Execution context for state management |
required |
Returns:
| Type | Description |
|---|---|
ExecutionResult | Iterator[DataFrame] | AsyncIterator[DataFrame]
|
ExecutionResult or iterator for streaming |