Skip to content

Add deployment config field to SagemakerEndpoint. - #318

Draft
cj-zhang wants to merge 2 commits into
langchain-ai:mainfrom
cj-zhang:main
Draft

Add deployment config field to SagemakerEndpoint.#318
cj-zhang wants to merge 2 commits into
langchain-ai:mainfrom
cj-zhang:main

Conversation

@cj-zhang

Copy link
Copy Markdown
  • 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.

@3coins Piyush Jain (3coins) left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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.

.. _boto3: <https://boto3.amazonaws.com/v1/documentation/api/latest/index.html>
"""

deployment_config: Optional[Dict] = None

Copy link
Copy Markdown
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.


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
Copy Markdown
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
Copy Markdown
Collaborator

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