-
Notifications
You must be signed in to change notification settings - Fork 143
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
Introduce Ml Inference Search Request Extension #3284
base: main
Are you sure you want to change the base?
Introduce Ml Inference Search Request Extension #3284
Conversation
@mingshl let's take the update from main. File has conflict. |
b2504c4
to
d5f7605
Compare
thanks @dhrubo-os , rebased and resolved conflicts. |
Tests are failing |
there is no changes related to ConversationalMemory, will try rerun the tests.
|
d5f7605
to
cfa8a38
Compare
rebased and resolved conflicts. |
|
9c576ec
to
3cf89dc
Compare
3cf89dc
to
037fd7f
Compare
plugin/src/main/java/org/opensearch/ml/processor/MLInferenceSearchRequestProcessor.java
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/processor/MLInferenceSearchRequestProcessor.java
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/processor/MLInferenceSearchRequestProcessor.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/processor/ModelExecutor.java
Outdated
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/searchext/MLInferenceRequestParametersExtBuilder.java
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/searchext/MLInferenceRequestParametersExtBuilder.java
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/searchext/MLInferenceRequestParametersUtil.java
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/searchext/MLInferenceRequestParametersUtil.java
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/searchext/MLInferenceRequestParametersUtil.java
Show resolved
Hide resolved
Looks good overall, but can you add REST test cases with some non trivial examples? |
common/src/main/java/org/opensearch/ml/common/utils/StringUtils.java
Outdated
Show resolved
Hide resolved
@@ -41,6 +41,7 @@ dependencies { | |||
testImplementation("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}") | |||
testImplementation("com.fasterxml.jackson.core:jackson-databind:${versions.jackson_databind}") | |||
testImplementation group: 'com.networknt' , name: 'json-schema-validator', version: '1.4.0' | |||
testImplementation 'com.jayway.jsonpath:json-path:2.9.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious why do we need this here? I don't see any tests in memory module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if I remove this dependency, it's throwing error in the build
ConversationMetaIndexITTests > testConversationsCanBeDeleted FAILED
java.lang.NoClassDefFoundError at ConversationMetaIndexITTests.java:268
Caused by: java.lang.ExceptionInInitializerError at IndexUtils.java:126
ConversationMetaIndexITTests > testCanQueryOverConversations FAILED
java.lang.NoClassDefFoundError at ConversationMetaIndexITTests.java:431
Caused by: java.lang.ExceptionInInitializerError at IndexUtils.java:126
ConversationMetaIndexITTests > testCanGetAConversationById FAILED
java.lang.NoClassDefFoundError at ConversationMetaIndexITTests.java:539
Caused by: java.lang.ExceptionInInitializerError at IndexUtils.java:126
ConversationMetaIndexITTests > testCanQueryOverConversationsByAdditionalInfo FAILED
java.lang.NoClassDefFoundError at ConversationMetaIndexITTests.java:679
Caused by: java.lang.ExceptionInInitializerError at IndexUtils.java:126
ConversationMetaIndexITTests > testCanAddNewConversation FAILED
java.lang.NoClassDefFoundError at ConversationMetaIndexITTests.java:152
Caused by: java.lang.ExceptionInInitializerError at IndexUtils.java:126
@@ -219,13 +226,15 @@ private void rewriteQueryString(SearchRequest request, String queryString, Actio | |||
* @param queryString the original query string | |||
* @param requestListener the {@link ActionListener} to be notified when the query string or query template is updated | |||
* @param processOutputMap the list of output mappings | |||
* @param requestContext |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added and rebased
plugin/src/main/java/org/opensearch/ml/processor/MLInferenceSearchRequestProcessor.java
Show resolved
Hide resolved
plugin/src/main/java/org/opensearch/ml/searchext/MLInferenceRequestParametersUtil.java
Show resolved
Hide resolved
Signed-off-by: Mingshi Liu <[email protected]>
Signed-off-by: Mingshi Liu <[email protected]>
…uest body Signed-off-by: Mingshi Liu <[email protected]>
Signed-off-by: Mingshi Liu <[email protected]>
d23f14c
to
0960694
Compare
I added two REST tests to verify in the new commit add REST test and javadoc and just rebased the changes from main branch |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3284 +/- ##
============================================
- Coverage 81.31% 80.30% -1.01%
- Complexity 6094 6713 +619
============================================
Files 573 602 +29
Lines 25268 28974 +3706
Branches 2666 3213 +547
============================================
+ Hits 20547 23269 +2722
- Misses 3601 4327 +726
- Partials 1120 1378 +258
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Description
Introduce Ml Inference Search Request Extension, this is adding ml_inference search extension during search request/query phase,
For the search response side, I already introduced a
ml_inference
search response extension in earlier PR released in 2.18. Support ML Inference Search Processor Writing to Search ExtensionRelated Issues
#3286
#3054
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.