-
Notifications
You must be signed in to change notification settings - Fork 25.6k
[ML] Custom service add support for input_type, top_n, and return_documents #129441
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
[ML] Custom service add support for input_type, top_n, and return_documents #129441
Conversation
|
Pinging @elastic/ml-core (Team:ML) |
| Strings.format( | ||
| "Input type translation value for key [%s] must be a String that is not null and not empty, received: [%s].", | ||
| key, | ||
| value.getClass().getSimpleName() |
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.
Can value be null?
| value.getClass().getSimpleName() | |
| value == null ? "null" : value.getClass().getSimpleName() |
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.
Oops, thank you.
| Strings.format( | ||
| "Invalid input type translation for key: [%s], is not a valid value. Must be one of %s", | ||
| key, | ||
| EnumSet.of(InputType.CLASSIFICATION, InputType.CLUSTERING, InputType.INGEST, InputType.SEARCH) |
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.
| EnumSet.of(InputType.CLASSIFICATION, InputType.CLUSTERING, InputType.INGEST, InputType.SEARCH) | |
| SUPPORTED_REQUEST_VALUES |
| * @param inputTypeTranslation the map of input type translations to validate | ||
| * @param validationException a ValidationException to which errors will be added | ||
| */ | ||
| public static Map<InputType, String> validateInputTypeTranslationValues( |
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.
Thanks for adding this
| entity.toXContent(builder, null); | ||
| String xContentResult = Strings.toString(builder); | ||
|
|
||
| var expected = XContentHelper.stripWhitespace(""" |
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.
TIL
💔 Backport failed
You can use sqren/backport to manually backport by running |
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
…uments (#129441) (#129860) * Making progress on different request parameters * Working tests * Adding custom service validator for rerank * Fixing embedding bug * Adding transport version check * Fixing tests * Fixing license header * Fixing writeTo * Moving file and removing commented code * Fixing test * Fixing tests * Refactoring and tests * Fixing test (cherry picked from commit d9b34d4) # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
…uments (elastic#129441) * Making progress on different request parameters * Working tests * Adding custom service validator for rerank * Fixing embedding bug * Adding transport version check * Fixing tests * Fixing license header * Fixing writeTo * Moving file and removing commented code * Fixing test * Fixing tests * Refactoring and tests * Fixing test
…uments (elastic#129441) * Making progress on different request parameters * Working tests * Adding custom service validator for rerank * Fixing embedding bug * Adding transport version check * Fixing tests * Fixing license header * Fixing writeTo * Moving file and removing commented code * Fixing test * Fixing tests * Refactoring and tests * Fixing test
This PR addresses the feedback item from the original PR: #127939
This PR adds support for
input_type,top_n, andreturn_documents.Comments:
#127939 (comment)