Skip to content

Commit fb6bb86

Browse files
authored
fix: Invalid import (5637) (#5723)
1 parent daf19b0 commit fb6bb86

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sagemaker-mlops/src/sagemaker/mlops/workflow/steps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _find_dependencies_in_step_arguments(
205205
else:
206206
dependencies.add(self._get_step_name_from_str(referenced_step, step_map))
207207

208-
from sagemaker.core.workflow.function_step import DelayedReturn
208+
from sagemaker.mlops.workflow.function_step import DelayedReturn
209209

210210
# TODO: we can remove the if-elif once move the validators to JsonGet constructor
211211
if isinstance(pipeline_variable, JsonGet):

sagemaker-mlops/tests/unit/workflow/test_steps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def test_step_find_dependencies_in_step_arguments_with_json_get():
409409
obj = {"key": json_get}
410410

411411
with patch('sagemaker.mlops.workflow.steps.TYPE_CHECKING', False):
412-
with patch.dict('sys.modules', {'sagemaker.core.workflow.function_step': Mock()}):
412+
with patch.dict('sys.modules', {'sagemaker.mlops.workflow.function_step': Mock()}):
413413
dependencies = Step._find_dependencies_in_step_arguments(step2, obj, {"step1": step1})
414414
assert "step1" in dependencies
415415

@@ -445,7 +445,7 @@ def test_step_find_dependencies_in_step_arguments_with_delayed_return():
445445
mock_module = Mock()
446446
mock_module.DelayedReturn = delayed_return_class
447447

448-
with patch.dict('sys.modules', {'sagemaker.core.workflow.function_step': mock_module}):
448+
with patch.dict('sys.modules', {'sagemaker.mlops.workflow.function_step': mock_module}):
449449
dependencies = Step._find_dependencies_in_step_arguments(step2, obj, {"step1": step1})
450450
assert "step1" in dependencies
451451

@@ -473,7 +473,7 @@ def test_step_find_dependencies_in_step_arguments_with_string_reference():
473473
mock_module = Mock()
474474
mock_module.DelayedReturn = delayed_return_class
475475

476-
with patch.dict('sys.modules', {'sagemaker.core.workflow.function_step': mock_module}):
476+
with patch.dict('sys.modules', {'sagemaker.mlops.workflow.function_step': mock_module}):
477477
dependencies = Step._find_dependencies_in_step_arguments(step2, obj, step_map)
478478
assert "step1" in dependencies
479479

0 commit comments

Comments
 (0)