-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: support maps in step parameters #2661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/sagemaker/workflow/properties.py
Outdated
Args: | ||
path (str): The parent path of the PropertiesMap instance. | ||
shape_name (str): The botocore sagemaker service model shape name. | ||
root_shape_name (str): The botocore sagemaker service model shape name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
root_shape_name
is not present in the arguments. We should remove this from doc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
@@ -855,6 +855,113 @@ def test_one_step_callback_pipeline(sagemaker_session, role, pipeline_name, regi | |||
pass | |||
|
|||
|
|||
def test_steps_with_map_params_pipeline( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be missing it but how is this testing map params?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert at line 947 and 948 are checking hyperparameter values? Do we need different asserts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated for testing hyperparameters
ef8150d
to
cb7ed39
Compare
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -67,6 +67,8 @@ def __init__( | |||
for key, info in members.items(): | |||
if Properties._shapes.get(info["shape"], {}).get("type") == "list": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think second param should be list here in get
@@ -67,6 +67,8 @@ def __init__( | |||
for key, info in members.items(): | |||
if Properties._shapes.get(info["shape"], {}).get("type") == "list": | |||
self.__dict__[key] = PropertiesList(f"{path}.{key}", info["shape"]) | |||
elif Properties._shapes.get(info["shape"], {}).get("type") == "map": | |||
self.__dict__[key] = PropertiesMap(f"{path}.{key}", info["shape"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am little confused here. info[shape] is map here so why does constructor has str in it
Co-authored-by: Ahsan Khan <[email protected]>
Issue #, if available:
Description of changes: This change is made to support map types in step properties.
Testing done:
Merge Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.General
Tests
unique_name_from_base
to create resource names in integ tests (if appropriate)By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.