aws / aws/sagemaker-python-sdk

Multi-container endpoint SKLearn support unclear

Đang mở
#4,555 2 bình luận 1 reaction 1 người được giao Được @mollyheamazon nhận Xem trên GitHub
component: hosting type: feature request
Ngôn ngữ chính
Python
Star
2.3k
Fork
1.3k
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
35

Mô tả

**What did you find confusing? Please describe.**

I am interested in using a multi-container endpoint, as described in AWS docs [here](https://docs.aws.amazon.com/sagemaker/latest/dg/multi-container-endpoints.html). Specifically, I am interested in using [`Direct` invocation mode](https://docs.aws.amazon.com/sagemaker/latest/dg/multi-container-direct.html).

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

```python
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](https://sagemaker.readthedocs.io/en/stable/frameworks/sklearn/sagemaker.sklearn.html#scikit-learn-model) and [its `deploy` function](https://sagemaker.readthedocs.io/en/stable/api/inference/model.html#sagemaker.model.Model.deploy).
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](https://sagemaker.readthedocs.io/) 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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.