Sagemaker Pipelines: Support for Parallel Step
Describe the feature you'd like I would like to be able to build my workflows in a way that I can execute some of my steps parallely similar to what Step Functions offers. How would this feature be used? Please describe. This would allow me to build real world ML Pipelines that are not just consist of simple linear process-train-transform pipelines as shown in the examples. Describe alternatives you've considered Step Functions
@elvinx Thanks for using SageMaker.
The data-dependency DAG of a SageMaker Pipeline allows steps whose data dependencies are satisfied to be run in parallel by the SageMaker Pipelines service, up to the step concurrency limits of your account.
Best regards
@elvinx Thanks for using SageMaker.
The data-dependency DAG of a SageMaker Pipeline allows steps whose data dependencies are satisfied to be run in parallel by the SageMaker Pipelines service, up to the step concurrency limits of your account.
Best regards
@metrizable Thanks for getting back to me on this. Not sure if I undestand your answer correctly. Could you please point me to the docs to see how I can achieve the parallelism mentioned?
@elvinx ,
From the public docs:
The structure of a pipeline's DAG is determined by the data dependencies between steps.
Parallel execution is implicit in the notion of an execution of a directed acyclic graph -- otherwise it's essentially just a line. Now, assuming data dependencies for steps have been satisfied, the degree of parallelism is bound by pipeline quotas for the number of steps in a pipeline, and your account limits for, say, the resources being consumed by processing and training jobs being run.
The notebook example here provides a DAG that will result in parallel execution of some of the steps. The CreateModelStep and RegisterModel in that pipeline will execute in parallel because the data dependencies for both of those steps will be satisfied when the SageMaker Pipeline executor service ends up picking them up near the end of the pipeline.
For a simple, abstract example:
step_a = SomeStep(..)
step_b = SomeStep(
arg=step_a.properties.Foo
)
step_c = SomeStep(
arg=step_a.properties.Bar
)
The data dependency DAG is essentially this: A->B; A->C. So, on execution, if step_a successfully completed, then the data properties for step_a would resolve. The executor would check data dependencies of other steps in the pipeline and find that both step_b and step_c could now run as all of their data dependencies were satisfied, and the executor would start both of those steps in parallel.
I hope @metrizable has answered your question. Thanks again for contacting us. Let us know if there's anything else we can help with.