Changeset View
Changeset View
Standalone View
Standalone View
python_modules/dagster/dagster/core/execution/plan/plan.py
from collections import OrderedDict, namedtuple | from collections import OrderedDict, namedtuple | ||||
from dagster import check | from dagster import check | ||||
from dagster.core.definitions import ( | from dagster.core.definitions import ( | ||||
CompositeSolidDefinition, | GraphDefinition, | ||||
IPipeline, | IPipeline, | ||||
InputDefinition, | InputDefinition, | ||||
Solid, | Solid, | ||||
SolidDefinition, | SolidDefinition, | ||||
SolidHandle, | SolidHandle, | ||||
SolidOutputHandle, | SolidOutputHandle, | ||||
) | ) | ||||
from dagster.core.definitions.dependency import DependencyStructure | from dagster.core.definitions.dependency import DependencyStructure | ||||
▲ Show 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | ): | ||||
# Create and add execution plan step for the solid compute function | # Create and add execution plan step for the solid compute function | ||||
if isinstance(solid.definition, SolidDefinition): | if isinstance(solid.definition, SolidDefinition): | ||||
solid_compute_step = create_compute_step( | solid_compute_step = create_compute_step( | ||||
self.pipeline_name, self.environment_config, solid, step_inputs, handle | self.pipeline_name, self.environment_config, solid, step_inputs, handle | ||||
) | ) | ||||
self.add_step(solid_compute_step) | self.add_step(solid_compute_step) | ||||
### 2b. RECURSE | ### 2b. RECURSE | ||||
# Recurse over the solids contained in an instance of CompositeSolidDefinition | # Recurse over the solids contained in an instance of GraphDefinition | ||||
elif isinstance(solid.definition, CompositeSolidDefinition): | elif isinstance(solid.definition, GraphDefinition): | ||||
self._build_from_sorted_solids( | self._build_from_sorted_solids( | ||||
solid.definition.solids_in_topological_order, | solid.definition.solids_in_topological_order, | ||||
solid.definition.dependency_structure, | solid.definition.dependency_structure, | ||||
parent_handle=handle, | parent_handle=handle, | ||||
parent_step_inputs=step_inputs, | parent_step_inputs=step_inputs, | ||||
) | ) | ||||
else: | else: | ||||
▲ Show 20 Lines • Show All 308 Lines • Show Last 20 Lines |