-
Notifications
You must be signed in to change notification settings - Fork 90
feat: Support Placeholders with ModelStep #175
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
feat: Support Placeholders with ModelStep #175
Conversation
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.
some minor nits. consider addressing them before shipping.
if isinstance(model, FrameworkModel): | ||
parameters = model_config(model=model, instance_type=instance_type, role=model.role, image_uri=model.image_uri) | ||
model_parameters = model_config(model=model, instance_type=instance_type, role=model.role, image_uri=model.image_uri) |
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.
nit: didn't really have an objection to this parameter name since they do ultimately resolve to Parameters
and you're calling the model_config
method to assign it.
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.
This was renamed to avoid confusion with the input parameters
provided in the args
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Description
Add support to define Model parameters dynamically using placeholders
Fixes #117
Why is the change necessary?
Currently, it is not possible to use placeholders for Sagemaker Model parameters. The properties cannot be defined dynamically, as they need to be defined in the Model which does not accept placeholders.
This change makes it possible to use placeholders for Model properties by using the parameters field that are passed down from the ModelStep.
Solution
Use the
parameters
field that is compatible with placeholders to define ModelStep properties.Merge the parameters that were generated from the Model with the input parameters:
Testing
Added unit and integ tests
Pull Request Checklist
Please check all boxes (including N/A items)
Testing
Documentation
Title and description
Fixes #xxx
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license.