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

Fix remote model with embedding input issue #3289

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

b4sjoo
Copy link
Collaborator

@b4sjoo b4sjoo commented Dec 18, 2024

Description

All remote embedding model will throw exception when use embedding input instead of remote input. However Neural Search uses a hardcoded value FunctionName.TEXT_EMBEDDING when instantiating the MLInput:
https://github.com/opensearch-project/neural-search/blob/7feacd67b3c7694ff4a1c1c2b430f2447a1ed4ab/src/main/java/org/opensearch/neuralsearch/ml/MLCommonsClientAccessor.java#L293

Therefore, we removed the required string parameter in input interface to enable the dual usage of remote model. In the future, we plan to use different interface on different usage in same connector as a long term fix.

Related Issues

Resolves #3261

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

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.

@dhrubo-os
Copy link
Collaborator

  1. Can we have any unit test which can reflect this change?
  2. Is there any documentation for model interface? Do we need to update the documentation too?

Signed-off-by: b4sjoo <[email protected]>
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env December 19, 2024 10:45 — with GitHub Actions Failure
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env December 19, 2024 10:45 — with GitHub Actions Failure
Signed-off-by: b4sjoo <[email protected]>
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env December 19, 2024 10:46 — with GitHub Actions Inactive
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env December 19, 2024 10:46 — with GitHub Actions Failure
@b4sjoo
Copy link
Collaborator Author

b4sjoo commented Dec 19, 2024

  1. Can we have any unit test which can reflect this change?
  2. Is there any documentation for model interface? Do we need to update the documentation too?

UT added.
Interface doc: https://opensearch.org/docs/latest/ml-commons-plugin/api/model-apis/register-model/#the-interface-parameter
No need to added because we are trying to fix the interface back to the expected behavior.

@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env December 19, 2024 12:19 — with GitHub Actions Inactive
@b4sjoo b4sjoo had a problem deploying to ml-commons-cicd-env December 19, 2024 13:17 — with GitHub Actions Failure
jngz-es
jngz-es previously approved these changes Dec 19, 2024
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env December 20, 2024 19:30 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env December 20, 2024 19:30 — with GitHub Actions Inactive
@b4sjoo b4sjoo temporarily deployed to ml-commons-cicd-env December 20, 2024 20:27 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Bedrock multimodal model interface can't work with neural search
4 participants