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

Merge the existing parameters when updating connectors #2784

Merged
merged 2 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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());
Copy link
Contributor

Choose a reason for hiding this comment

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

Add UT and integ test? Seems this logic is not tested, otherwise the change of the behavior should break existing tests

Copy link
Contributor

Choose a reason for hiding this comment

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

BTW, thanks for the fix

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Will do in the next PR.

}
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
Loading