Reputation: 17383
SageMaker documentatin explains how to run a pipeline, but it assumes I have just defined it and I have the object pipeline
available.
How can I run an existing pipeline with Python SDK?
I know how to read a pipeline with AWS CLI (i.e. aws sagemaker describe-pipeline --pipeline-name foo
). Can the same be done with Python code? Then I would have pipeline
object ready to use.
Upvotes: 3
Views: 1290
Reputation: 1314
If the Pipeline has been created, you can use the Python Boto3 SDK to make the StartPipelineExecution
API call.
response = client.start_pipeline_execution(
PipelineName='string',
PipelineExecutionDisplayName='string',
PipelineParameters=[
{
'Name': 'string',
'Value': 'string'
},
],
PipelineExecutionDescription='string',
ClientRequestToken='string',
ParallelismConfiguration={
'MaxParallelExecutionSteps': 123
}
)
If you prefer AWS CLI, the most basic call is:
aws sagemaker start-pipeline-execution --pipeline-name <name-of-the-pipeline>
Upvotes: 5