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

add connector blueprint for cohere embedding models in bedrock #2667

Merged
merged 3 commits into from
Jul 18, 2024

Conversation

Zhangxunmt
Copy link
Collaborator

Description

Blueprints for cohere embedding models in bedrock.

Issues Resolved

[List any issues this PR will resolve]

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@ylwu-amzn
Copy link
Collaborator

ylwu-amzn commented Jul 17, 2024

@Zhangxunmt
Copy link
Collaborator Author

How about add to https://github.com/opensearch-project/ml-commons/blob/2.x/docs/remote_inference_blueprints/cohere_connector_embedding_blueprint.md, most part should be same ?

These two are pretty consistent with the current bedrock model blueprints examples. There are separate azure_openai and openai connectors. So why we want to merge them together? Cohere deployed inside Bedrock can be considered as bedrock models too.

@Zhangxunmt Zhangxunmt temporarily deployed to ml-commons-cicd-env July 17, 2024 19:46 — with GitHub Actions Inactive
## 5. Test model inference

```json
POST /_plugins/_ml/models/rcormY8B8aiZvtEZIe89/_predict
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you also try if this API can work ? neural-search requires this API can work

POST /_plugins/_ml/_predict/text_embedding/<model_id>
{
  "text_docs":[ "today is sunny", "today is sunny"],
  "return_number": true,
  "target_response": ["sentence_embedding"]
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes this is also verified too. It invokes successfully.

@Zhangxunmt Zhangxunmt temporarily deployed to ml-commons-cicd-env July 17, 2024 22:27 — with GitHub Actions Inactive
@Zhangxunmt Zhangxunmt temporarily deployed to ml-commons-cicd-env July 17, 2024 22:27 — with GitHub Actions Inactive
"parameters": {
"region": "<PLEASE ADD YOUR AWS REGION HERE>",
"service_name": "bedrock",
"truncate": "<NONE|START|END>",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add some explanation for truncate and input_type?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added the AWS doc link to explain all parameters in the latest commit.

@Zhangxunmt Zhangxunmt temporarily deployed to ml-commons-cicd-env July 17, 2024 23:28 — with GitHub Actions Inactive
@Zhangxunmt Zhangxunmt temporarily deployed to ml-commons-cicd-env July 18, 2024 00:45 — with GitHub Actions Inactive
@Zhangxunmt Zhangxunmt had a problem deploying to ml-commons-cicd-env July 18, 2024 00:46 — with GitHub Actions Failure
@Zhangxunmt Zhangxunmt merged commit 2062a7a into opensearch-project:main Jul 18, 2024
5 of 6 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 18, 2024
* add connector blueprint for cohere embedding models in bedrock

Signed-off-by: Xun Zhang <[email protected]>

* add neural search way of invoking

Signed-off-by: Xun Zhang <[email protected]>

* add AWS doc link and update model group names

Signed-off-by: Xun Zhang <[email protected]>

---------

Signed-off-by: Xun Zhang <[email protected]>
(cherry picked from commit 2062a7a)
Zhangxunmt added a commit that referenced this pull request Jul 18, 2024
#2678)

* add connector blueprint for cohere embedding models in bedrock

Signed-off-by: Xun Zhang <[email protected]>

* add neural search way of invoking

Signed-off-by: Xun Zhang <[email protected]>

* add AWS doc link and update model group names

Signed-off-by: Xun Zhang <[email protected]>

---------

Signed-off-by: Xun Zhang <[email protected]>
(cherry picked from commit 2062a7a)

Co-authored-by: Xun Zhang <[email protected]>
@b4sjoo b4sjoo added the v2.16.0 Issues targeting release v2.16.0 label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x v2.16.0 Issues targeting release v2.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants