Skip to content

Conversation

DonalEvans
Copy link
Contributor

The SenderService.infer() method was converting the input variable from a List<String> into a List<ChunkInferenceInput>, but then when that list was passed into SenderService. createInput() it was immediately converted back into a List<String>. To avoid unnecessary work, allow the EmbeddingsInput constructor to convert the list if necessary.

@DonalEvans DonalEvans added >refactoring :ml Machine learning Team:ML Meta label for the ML team v9.2.0 labels Sep 17, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/ml-core (Team:ML)

Copy link
Contributor

@jonathan-buttner jonathan-buttner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@DonalEvans DonalEvans merged commit 8d2c4c3 into elastic:main Sep 17, 2025
34 checks passed
@DonalEvans DonalEvans deleted the do-not-copy-inference-input-unnecessarily branch September 17, 2025 20:40
gmjehovich pushed a commit to gmjehovich/elasticsearch that referenced this pull request Sep 18, 2025
…sary (elastic#134945)

The SenderService.infer() method was converting the input variable from 
a List<String> into a List<ChunkInferenceInput>, but then when that list
was passed into SenderService.createInput() it was immediately
converted back into a List<String>. To avoid unnecessary work, allow the
EmbeddingsInput constructor to convert the list if necessary.
@jonathan-buttner
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
9.1

Questions ?

Please refer to the Backport tool documentation

jonathan-buttner pushed a commit to jonathan-buttner/elasticsearch that referenced this pull request Sep 18, 2025
…sary (elastic#134945)

The SenderService.infer() method was converting the input variable from
a List<String> into a List<ChunkInferenceInput>, but then when that list
was passed into SenderService.createInput() it was immediately
converted back into a List<String>. To avoid unnecessary work, allow the
EmbeddingsInput constructor to convert the list if necessary.

(cherry picked from commit 8d2c4c3)
elasticsearchmachine pushed a commit that referenced this pull request Sep 18, 2025
…sary (#134945) (#135024)

The SenderService.infer() method was converting the input variable from
a List<String> into a List<ChunkInferenceInput>, but then when that list
was passed into SenderService.createInput() it was immediately
converted back into a List<String>. To avoid unnecessary work, allow the
EmbeddingsInput constructor to convert the list if necessary.

(cherry picked from commit 8d2c4c3)

Co-authored-by: Donal Evans <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Sep 23, 2025
…sary (#134945) (#135291)

The SenderService.infer() method was converting the input variable from
a List<String> into a List<ChunkInferenceInput>, but then when that list
was passed into SenderService.createInput() it was immediately
converted back into a List<String>. To avoid unnecessary work, allow the
EmbeddingsInput constructor to convert the list if necessary.

(cherry picked from commit 8d2c4c3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:ml Machine learning >refactoring Team:ML Meta label for the ML team v8.19.5 v9.1.5 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants