Skip to content

[ML] Don't translate already chunked results#110592

Merged
davidkyle merged 1 commit intoelastic:mainfrom
davidkyle:dont-translate
Jul 8, 2024
Merged

[ML] Don't translate already chunked results#110592
davidkyle merged 1 commit intoelastic:mainfrom
davidkyle:dont-translate

Conversation

@davidkyle
Copy link
Copy Markdown
Member

An error was reported using the Amazon Bedrock service with a large input that was chunked.

        "reason": "Exception when running inference id [bedrock-embeddings] on field [super_body]",
        "caused_by": {
            "type": "illegal_argument_exception",
            "reason": "The number of inputs [1] does not match the embeddings [3]"
        }

The problem was an unnecessary call of translateToChunkedResults as the EmbeddingRequestChunker returns the right thing.

Non issue as it fixes a bug in code merged one working day ago.

}
}

private static List<ChunkedInferenceServiceResults> translateToChunkedResults(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Unused code

@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Jul 8, 2024
Copy link
Copy Markdown
Contributor

@markjhoy markjhoy left a comment

Choose a reason for hiding this comment

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

Ah - this looks good... great catch. 🤦 - more than 1 listener things start to get complicated... 😅

@davidkyle davidkyle added the :ml Machine learning label Jul 8, 2024
@elasticsearchmachine elasticsearchmachine added the Team:ML Meta label for the ML team label Jul 8, 2024
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

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

@elasticsearchmachine elasticsearchmachine removed the needs:triage Requires assignment of a team area label label Jul 8, 2024
@davidkyle davidkyle merged commit b01949c into elastic:main Jul 8, 2024
@davidkyle davidkyle deleted the dont-translate branch July 8, 2024 16:23
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

💔 Backport failed

The backport operation could not be completed due to the following error:

An unexpected error occurred when attempting to backport this PR.

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 110592

@markjhoy
Copy link
Copy Markdown
Contributor

markjhoy commented Jul 8, 2024

(for backtracing, referencing the original PR this fixes: #110248)

davidkyle added a commit to davidkyle/elasticsearch that referenced this pull request Jul 9, 2024
…#110592)

Fixes error using the Amazon Bedrock service with a large 
input that was chunked.
elasticsearchmachine pushed a commit that referenced this pull request Jul 9, 2024
#110624)

Fixes error using the Amazon Bedrock service with a large 
input that was chunked.
tvernum pushed a commit that referenced this pull request Feb 25, 2025
Fixes error using the Amazon Bedrock service with a large 
input that was chunked.
tvernum pushed a commit that referenced this pull request Feb 25, 2025
Fixes error using the Amazon Bedrock service with a large 
input that was chunked.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants