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

[BUG] Can't generate multiple embeddings with Bedrock embedding model #2490

Closed
ylwu-amzn opened this issue Jun 2, 2024 · 3 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@ylwu-amzn
Copy link
Collaborator

What is the bug?
Bedrock embedding model can't generate embeddings for multiple text inputs.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Create OpenSearch 2.14 cluster
  2. Create Bedrock embedding model with this blueprint https://github.com/opensearch-project/ml-commons/blob/2.x/docs/remote_inference_blueprints/bedrock_connector_titan_embedding_blueprint.md
  3. Run predict
POST _plugins/_ml/_predict/text_embedding/<model_id>
{
  "text_docs":[ "hello world", "today is sunny"],
  "return_number": true,
  "target_response": ["sentence_embedding"]
}

Can see only one embedding generated.

What is the expected behavior?
Should generate embeddings for all text inputs.

What is your host/environment?

  • OS: Linux
  • Version: 2.14
  • Plugins

Do you have any screenshots?
No

Do you have any additional context?
No

@ylwu-amzn ylwu-amzn added bug Something isn't working untriaged labels Jun 2, 2024
@ylwu-amzn
Copy link
Collaborator Author

@zane-neo This caused by #1958. Can you help fix this ?

@zane-neo zane-neo self-assigned this Jun 4, 2024
@zane-neo
Copy link
Collaborator

zane-neo commented Jun 4, 2024

This has a workaround which is to update the connector info adding step size like below:

PUT /_plugins/_ml/connectors/{connector_id}
{
    "parameters": {
        "service_name": "bedrock",
        "input_docs_processed_step_size": "1",
        "region": "{your_region}"
    }
}

Also, will create PR to fix this.

@zane-neo
Copy link
Collaborator

Closing this issue as it is resolved now.

@github-project-automation github-project-automation bot moved this from In Progress to Done in ml-commons projects Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

2 participants