Skip to content

Commit 450e4a5

Browse files
committed
allow step instance in depends on list for repack and reigster model step
1 parent eb6a523 commit 450e4a5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/sagemaker/workflow/_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import tarfile
1919
import tempfile
2020

21-
from typing import List
21+
from typing import List, Union
2222

2323
from sagemaker import image_uris
2424
from sagemaker.inputs import TrainingInput
@@ -59,7 +59,7 @@ def __init__(
5959
entry_point: str,
6060
source_dir: str = None,
6161
dependencies: List = None,
62-
depends_on: List[str] = None,
62+
depends_on: Union[List[str], List[Step]] = None,
6363
**kwargs,
6464
):
6565
"""Constructs a TrainingStep, given an `EstimatorBase` instance.
@@ -226,7 +226,7 @@ def __init__(
226226
image_uri=None,
227227
compile_model_family=None,
228228
description=None,
229-
depends_on: List[str] = None,
229+
depends_on: Union[List[str], List[Step]] = None,
230230
tags=None,
231231
**kwargs,
232232
):
@@ -255,8 +255,8 @@ def __init__(
255255
compile_model_family (str): Instance family for compiled model, if specified, a compiled
256256
model will be used (default: None).
257257
description (str): Model Package description (default: None).
258-
depends_on (List[str]): A list of step names this `sagemaker.workflow.steps.TrainingStep`
259-
depends on
258+
depends_on (List[str] or List[Step]): A list of step names or instances
259+
this step depends on
260260
**kwargs: additional arguments to `create_model`.
261261
"""
262262
super(_RegisterModelStep, self).__init__(name, StepTypeEnum.REGISTER_MODEL, depends_on)

0 commit comments

Comments
 (0)