Skip to content

Commit 63bad2b

Browse files
nishkrisShegufta Ahsan
authored and
Shegufta Ahsan
committed
doc: Update Selective Execution Documentation (aws#936)
1 parent f45ba86 commit 63bad2b

File tree

3 files changed

+21
-10
lines changed

3 files changed

+21
-10
lines changed

doc/workflows/pipelines/sagemaker.workflow.pipelines.rst

+6
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,12 @@ Pipeline Experiment Config
110110

111111
.. autoclass:: sagemaker.workflow.pipeline_experiment_config.PipelineExperimentConfigProperty
112112

113+
Selective Execution Config
114+
--------------------------
115+
116+
.. autoclass:: sagemaker.workflow.selective_execution_config.SelectiveExecutionConfig
117+
118+
113119
Properties
114120
----------
115121

src/sagemaker/workflow/pipeline.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@ def start(
325325
parallelism_config (Optional[ParallelismConfiguration]): Parallelism configuration
326326
that is applied to each of the executions of the pipeline. It takes precedence
327327
over the parallelism configuration of the parent pipeline.
328-
selective_execution_config (SelectiveExecutionConfig): configuration for
329-
selective step execution
328+
selective_execution_config (Optional[SelectiveExecutionConfig]): The configuration for
329+
selective step execution.
330330
331331
Returns:
332332
A `_PipelineExecution` instance, if successful.

src/sagemaker/workflow/selective_execution_config.py

+13-8
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,34 @@
1717

1818

1919
class SelectiveExecutionConfig:
20-
"""Selective execution config config for SageMaker pipeline."""
20+
"""The selective execution configuration, which defines a subset of pipeline steps to run in
21+
22+
another SageMaker pipeline run.
23+
"""
2124

2225
def __init__(self, selected_steps: List[str], source_pipeline_execution_arn: str = None):
23-
"""Create a SelectiveExecutionConfig
26+
"""Create a `SelectiveExecutionConfig`.
2427
2528
Args:
26-
source_pipeline_execution_arn (str): ARN of the previously executed pipeline execution.
27-
The given arn pipeline execution status can be either Failed or Success.
28-
selected_steps (List[str]): List of step names that pipeline users want to run
29-
in new subworkflow-execution. The steps must be connected.
29+
source_pipeline_execution_arn (str): The ARN from a reference execution of the
30+
current pipeline. Used to copy input collaterals needed for the selected
31+
steps to run. The execution status of the pipeline can be `Stopped`, `Failed`, or
32+
`Succeeded`.
33+
selected_steps (List[str]): A list of pipeline steps to run. All step(s) in all
34+
path(s) between two selected steps should be included.
3035
"""
3136
self.source_pipeline_execution_arn = source_pipeline_execution_arn
3237
self.selected_steps = selected_steps
3338

3439
def _build_selected_steps_from_list(self) -> RequestType:
35-
"""Get the request structure for list of selected steps"""
40+
"""Get the request structure for the list of selected steps."""
3641
selected_step_list = []
3742
for selected_step in self.selected_steps:
3843
selected_step_list.append(dict(StepName=selected_step))
3944
return selected_step_list
4045

4146
def to_request(self) -> RequestType:
42-
"""Convert SelectiveExecutionConfig object to request dict."""
47+
"""Convert `SelectiveExecutionConfig` object to request dict."""
4348
request = {}
4449

4550
if self.source_pipeline_execution_arn is not None:

0 commit comments

Comments
 (0)