Skip to content
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

Add deployment config field to SagemakerEndpoint. #318

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cj-zhang
Copy link

  • Add deployment_config field on SagemakerEndpoint to allow SageMaker model and compute definitions.
  • To be used with the SageMaker PythonSDK ModelBuilder class to enable just-in-time deployments.

Copy link
Collaborator

@3coins 3coins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cj-zhang
Thanks for submitting this change. A minor suggestion to use a model rather than dict to self validate the config.

deployment_config: Optional[Dict] = None
"""The deployment configuration for an undeployed endpoint or inference component
which can be deployed through the Sagemaker Python SDK ModelBuilder class.
Comprises two sub-dictionaries model_config and endpoint_config.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Comprises two sub-dictionaries model_config and endpoint_config.
Comprises two sub-dictionaries model_config and endpoint_config.

@@ -263,6 +268,33 @@ def transform_output(self, output: bytes) -> str:
.. _boto3: <https://boto3.amazonaws.com/v1/documentation/api/latest/index.html>
"""

deployment_config: Optional[Dict] = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than keeping this as an open-ended dictionary, how about encoding this as a pydantic model, with allowed additions.

@@ -263,6 +268,33 @@ def transform_output(self, output: bytes) -> str:
.. _boto3: <https://boto3.amazonaws.com/v1/documentation/api/latest/index.html>
"""

deployment_config: Optional[Dict] = None
"""The deployment configuration for an undeployed endpoint or inference component
which can be deployed through the Sagemaker Python SDK ModelBuilder class.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the Model Builder SDK changes available to test this?

@3coins
Copy link
Collaborator

3coins commented Jan 16, 2025

@cj-zhang
As discussed this is an exploratory PR at this point, and not ready to merge. Could you either make this a draft or close.

@cj-zhang cj-zhang marked this pull request as draft January 16, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants