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

Multi-container endpoint SKLearn support unclear #4555

Open
stevenpitts opened this issue Apr 2, 2024 · 1 comment
Open

Multi-container endpoint SKLearn support unclear #4555

stevenpitts opened this issue Apr 2, 2024 · 1 comment
Labels
component: hosting Relates to the SageMaker Hosting Platform type: feature request

Comments

@stevenpitts
Copy link
Contributor

What did you find confusing? Please describe.

I am interested in using a multi-container endpoint, as described in AWS docs here. Specifically, I am interested in using Direct invocation mode.

In their documentation, as part of creating the multi-container endpoint, they call sm_client.create_model with a Containers argument:

container1 = {
                 'Image': '123456789012.dkr.ecr.us-east-1.amazonaws.com/myimage1:mytag',
                 'ContainerHostname': 'firstContainer'
             }

container2 = {
                 'Image': '123456789012.dkr.ecr.us-east-1.amazonaws.com/myimage2:mytag',
                 'ContainerHostname': 'secondContainer'
             }
inferenceExecutionConfig = {'Mode': 'Direct'}

import boto3
sm_client = boto3.Session().client('sagemaker')

response = sm_client.create_model(
               ModelName = 'my-direct-mode-model-name',
               InferenceExecutionConfig = inferenceExecutionConfig,
               ExecutionRoleArn = role,
               Containers = [container1, container2]
           )

In sagemaker-python-sdk with SKLearn, the equivalent code would seem to be the SKLearnModel constructor and its deploy function.
Neither of those seem to accept information on multiple containers.

Am I missing the function/input I'm supposed to use? Is there some different SKLearnModelMultiContainer class I'm supposed to be using instead? Am I supposed to use a combination of sagemaker-python-sdk and boto3's SageMaker client? Are multi-container endpoints just not supported with sagemaker-python-sdk yet?

I also tried searching the docs site for "multi container" and variants of the phrase, and couldn't find anything useful.

Describe how documentation can be improved

Document whether multi-container endpoints are supported with sagemaker-python-sdk, and if they are, the way in which they're supported.

Additional context

I'm not the most knowledgeable with ML stuff, so maybe I'm totally misunderstanding something here.

@mufaddal-rohawala mufaddal-rohawala added component: hosting Relates to the SageMaker Hosting Platform type: feature request labels Apr 12, 2024
@mufaddal-rohawala
Copy link
Member

Hi @stevenpitts Thanks for reaching out to SageMaker. It seems like the requested feature of hosting a multi-container endpoint is currently unavailable in SageMaker Python SDK. We are working on prioritising this support to provide an abstracted easier experience in SageMaker Python SDK. In the meantime though please continue to use Boto3 low-level api's directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: hosting Relates to the SageMaker Hosting Platform type: feature request
Projects
None yet
Development

No branches or pull requests

2 participants