Skip to content

Commit

Permalink
Merge the existing parameters when updating connectors (#2784)
Browse files Browse the repository at this point in the history
* merge the existing parameters when updating connectors

Signed-off-by: Xun Zhang <xunzh@amazon.com>

* add more details in sagemaker model for batch inference

Signed-off-by: Xun Zhang <xunzh@amazon.com>

---------

Signed-off-by: Xun Zhang <xunzh@amazon.com>
  • Loading branch information
Zhangxunmt authored Jul 30, 2024
1 parent 2cacf3b commit e16f38a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ public void update(MLCreateConnectorInput updateContent, Function<String, String
this.protocol = updateContent.getProtocol();
}
if (updateContent.getParameters() != null && updateContent.getParameters().size() > 0) {
this.parameters = updateContent.getParameters();
getParameters().putAll(updateContent.getParameters());
}
if (updateContent.getCredential() != null && updateContent.getCredential().size() > 0) {
this.credential = updateContent.getCredential();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@ Read more details on https://opensearch.org/docs/latest/ml-commons-plugin/remote
Integrate the SageMaker Batch Transform API using the connector below with a new action type "batch_predict".
For more details to use batch transform to run inference with Amazon SageMaker, please refer to https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html.

SageMaker uses your pre-created model to execute the batch transform job. For creating your model in SageMaker
that supports batch transform, please refer to https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModel.html. In this example, the following primary
container is used to create the text-embedding DJL model in SageMaker.
```json
"ModelName": "DJL-Text-Embedding-Model-imageforjsonlines",
"PrimaryContainer": {
"Environment": {
"SERVING_LOAD_MODELS" : "djl://ai.djl.huggingface.pytorch/sentence-transformers/all-MiniLM-L6-v2"
},
"Image": "763104351884.dkr.ecr.us-east-1.amazonaws.com/djl-inference:0.22.1-cpu-full"
}
```
#### 1. Create your Model connector and Model group

##### 1a. Register Model group
Expand Down

0 comments on commit e16f38a

Please sign in to comment.