Open
Conversation
Collaborator
sagemaker-bot
left a comment
There was a problem hiding this comment.
🤖 AI Code Review
This PR correctly fixes an invalid import path for DelayedReturn in sagemaker-mlops/src/sagemaker/mlops/workflow/steps.py, changing it from the non-existent sagemaker.core.workflow.function_step to the correct sagemaker.mlops.workflow.function_step. The corresponding test mocks are also updated to match. The fix is straightforward, correct, and backward compatible.
✅ No issues found — looks good!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The issue is an invalid import on line 208 of
sagemaker-mlops/src/sagemaker/mlops/workflow/steps.py. TheDelayedReturnclass is defined insagemaker.mlops.workflow.function_step, but the import incorrectly referencessagemaker.core.workflow.function_step, which does not exist. This is a lazy import inside_find_dependencies_in_step_arguments(). The modulesagemaker.core.workflow.function_stepdoesn't exist —DelayedReturnlives in the mlops package atsagemaker.mlops.workflow.function_step. Other files in the codebase (e.g.,sagemaker-mlops/src/sagemaker/mlops/local/pipeline.py,sagemaker-core/src/sagemaker/core/remote_function/core/pipeline_variables.py) correctly import fromsagemaker.mlops.workflow.function_step. The test file also has mock patches referencing the wrong module path.Related Issue
Related issue: 5637
Changes Made
sagemaker-mlops/src/sagemaker/mlops/workflow/steps.pysagemaker-mlops/tests/unit/workflow/test_steps.pyAI-Generated PR
This PR was automatically generated by the PySDK Issue Agent.
Merge Checklist
prefix: descriptionformat