-
Notifications
You must be signed in to change notification settings - Fork 138
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
Conversation
Signed-off-by: b4sjoo <sicheng.song@outlook.com>
|
UT added. |
plugin/src/test/java/org/opensearch/ml/utils/MLNodeUtilsTests.java
Outdated
Show resolved
Hide resolved
…chema Signed-off-by: b4sjoo <sicheng.song@outlook.com>
plugin/src/test/java/org/opensearch/ml/utils/MLNodeUtilsTests.java
Outdated
Show resolved
Hide resolved
Signed-off-by: b4sjoo <sicheng.song@outlook.com>
* Fix remote model with embedding input issue Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Spotless Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT for both embedding and remote cases for all remote embedding schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Remove hardcoded test schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> --------- Signed-off-by: b4sjoo <sicheng.song@outlook.com> (cherry picked from commit b631d89)
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.16 2.16
# Navigate to the new working tree
cd .worktrees/backport-2.16
# Create a new branch
git switch --create backport/backport-3289-to-2.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 b631d89eb3b38fe233060a3c5826f42af2a8ca99
# Push it to GitHub
git push --set-upstream origin backport/backport-3289-to-2.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.16 Then, create a pull request where the |
* Fix remote model with embedding input issue Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Spotless Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT for both embedding and remote cases for all remote embedding schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Remove hardcoded test schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> --------- Signed-off-by: b4sjoo <sicheng.song@outlook.com> (cherry picked from commit b631d89)
* Fix remote model with embedding input issue Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Spotless Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT for both embedding and remote cases for all remote embedding schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Remove hardcoded test schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> --------- Signed-off-by: b4sjoo <sicheng.song@outlook.com> (cherry picked from commit b631d89)
* Fix remote model with embedding input issue Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Spotless Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT for both embedding and remote cases for all remote embedding schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Remove hardcoded test schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> --------- Signed-off-by: b4sjoo <sicheng.song@outlook.com> (cherry picked from commit b631d89) Co-authored-by: Sicheng Song <sicheng.song@outlook.com>
* Fix remote model with embedding input issue Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Spotless Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT for both embedding and remote cases for all remote embedding schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Remove hardcoded test schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> --------- Signed-off-by: b4sjoo <sicheng.song@outlook.com> (cherry picked from commit b631d89) Co-authored-by: Sicheng Song <sicheng.song@outlook.com>
* Fix remote model with embedding input issue Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Spotless Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT for both embedding and remote cases for all remote embedding schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Remove hardcoded test schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> --------- Signed-off-by: b4sjoo <sicheng.song@outlook.com> (cherry picked from commit b631d89) Co-authored-by: Sicheng Song <sicheng.song@outlook.com>
* Fix remote model with embedding input issue Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Spotless Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT for both embedding and remote cases for all remote embedding schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Remove hardcoded test schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> --------- Signed-off-by: b4sjoo <sicheng.song@outlook.com>
) * cherry-picking commit b29b893 Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Fix remote model with embedding input issue (#3289) * Fix remote model with embedding input issue Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Spotless Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Add UT for both embedding and remote cases for all remote embedding schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> * Remove hardcoded test schema Signed-off-by: b4sjoo <sicheng.song@outlook.com> --------- Signed-off-by: b4sjoo <sicheng.song@outlook.com> --------- Signed-off-by: b4sjoo <sicheng.song@outlook.com> Co-authored-by: opensearch-trigger-bot[bot] <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com>
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 theMLInput
: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
--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.