aws / aws/sagemaker-python-sdk

ModelStep should have a 'adds_depends_on' class method

Closed
#5,440 0 comments 0 reactions 0 assignees View on GitHub
component: pipelines type: bug
Dominant language
Python
Stars
2.3k
Forks
1.3k
Avg merge
2d 2h
Merged PRs (30d)
32

Description

**Describe the feature you'd like**
When constructing SageMaker pipelines, I want to construct steps that sequence Training jobs (TrainingStep) and Inference jobs (ModelStep and TransformStep) together. As part of this, I would use `add_depends_on` from the TrainingStep to allow me to string together tasks. However, we cannot do the same for ModelStep. It has to be passed via the `depends_on` parameter during initialization.

**How would this feature be used? Please describe.**
```
def setup(…):
model_step = ModelStep(…)
transform_step = TransformStep(…, model_step…)

model_step.add_depends_on(other_steps)
```

**Describe alternatives you've considered**
I am forced to pass in dependencies throughout my abstractions, rather than construct the model_step first, and then add dependencies later.

**Additional context**
happy to add more details if needed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.