cursus.core.compiler.dynamic_template

Dynamic Pipeline Template for the Pipeline API.

This module provides a dynamic implementation of PipelineTemplateBase that can work with any PipelineDAG structure without requiring custom template classes.

class DynamicPipelineTemplate(dag, config_path, config_resolver=None, step_catalog=None, skip_validation=False, pipeline_parameters=None, **kwargs)[source]

Bases: PipelineTemplateBase

Dynamic pipeline template that works with any PipelineDAG.

This template automatically implements the abstract methods of PipelineTemplateBase by using intelligent resolution mechanisms to map DAG nodes to configurations and step builders.

CONFIG_CLASSES: Dict[str, Type[BasePipelineConfig]] = {}
get_resolution_preview()[source]

Get a preview of how DAG nodes will be resolved.

Returns:

Dictionary with resolution preview information

Return type:

Dict[str, Any]

get_step_catalog_stats()[source]

Get statistics about the step catalog.

Returns:

Dictionary with step catalog statistics

Return type:

Dict[str, Any]

validate_before_build()[source]

Validate the configuration before building the pipeline.

Returns:

True if validation passes, False otherwise

Return type:

bool

get_step_dependencies()[source]

Get the dependencies for each step based on the DAG.

Returns:

Dictionary mapping step names to their dependencies

Return type:

Dict[str, list]

get_execution_order()[source]

Get the topological execution order of steps.

Returns:

List of step names in execution order

Return type:

list

pipeline_metadata: Dict[str, Any]