orchestrator.Orchestrator
- class orchestrator.Orchestrator(model_registry=None, control_system=None, state_manager=None, yaml_compiler=None, error_handler=None, resource_allocator=None, parallel_executor=None, max_concurrent_tasks=10)[source]
Bases:
objectMain orchestration engine.
Coordinates the execution of pipelines by managing tasks, dependencies, and control systems.
- __init__(model_registry=None, control_system=None, state_manager=None, yaml_compiler=None, error_handler=None, resource_allocator=None, parallel_executor=None, max_concurrent_tasks=10)[source]
Initialize orchestrator.
- Parameters:
model_registry (
Optional[ModelRegistry]) – Model registry for model selectioncontrol_system (
Optional[ControlSystem]) – Control system for task executionstate_manager (
Optional[StateManager]) – State manager for checkpointingyaml_compiler (
Optional[YAMLCompiler]) – YAML compiler for pipeline parsingerror_handler (
Optional[ErrorHandler]) – Error handler for fault toleranceresource_allocator (
Optional[ResourceAllocator]) – Resource allocator for task schedulingparallel_executor (
Optional[ParallelExecutor]) – Parallel executor for concurrent executionmax_concurrent_tasks (
int) – Maximum concurrent tasks
Methods
__init__([model_registry, control_system, ...])Initialize orchestrator.
Clear execution history.
execute_pipeline(pipeline[, ...])Execute a pipeline.
execute_yaml(yaml_content[, context])Execute pipeline from YAML content.
execute_yaml_file(yaml_file[, context])Execute pipeline from YAML file.
get_execution_history([limit])Get execution history.
get_execution_status(execution_id)Get execution status.
Get performance metrics for the orchestrator.
Perform health check on all components.
List all running pipeline execution IDs.
recover_pipeline(execution_id[, from_checkpoint])Recover a failed pipeline from checkpoint.
shutdown()Shutdown orchestrator and clean up resources.
- __init__(model_registry=None, control_system=None, state_manager=None, yaml_compiler=None, error_handler=None, resource_allocator=None, parallel_executor=None, max_concurrent_tasks=10)[source]
Initialize orchestrator.
- Parameters:
model_registry (
Optional[ModelRegistry]) – Model registry for model selectioncontrol_system (
Optional[ControlSystem]) – Control system for task executionstate_manager (
Optional[StateManager]) – State manager for checkpointingyaml_compiler (
Optional[YAMLCompiler]) – YAML compiler for pipeline parsingerror_handler (
Optional[ErrorHandler]) – Error handler for fault toleranceresource_allocator (
Optional[ResourceAllocator]) – Resource allocator for task schedulingparallel_executor (
Optional[ParallelExecutor]) – Parallel executor for concurrent executionmax_concurrent_tasks (
int) – Maximum concurrent tasks
- async execute_pipeline(pipeline, checkpoint_enabled=True, max_retries=3)[source]
Execute a pipeline.
- async execute_yaml(yaml_content, context=None, **kwargs)[source]
Execute pipeline from YAML content.
- async execute_yaml_file(yaml_file, context=None, **kwargs)[source]
Execute pipeline from YAML file.
- async recover_pipeline(execution_id, from_checkpoint=None)[source]
Recover a failed pipeline from checkpoint.