Skip to content

Conversation

@benwtrent
Copy link
Member

This updates the following scenarios and causes NER/native inference to fail and not write a warning:

  • missing vocabulary values
  • missing model/deployment
  • native process failed
  • native process stopping
  • request timed out
  • misconfigured inference task update type

@elasticmachine elasticmachine added the Team:ML Meta label for the ML team label Dec 7, 2021
@elasticmachine
Copy link
Collaborator

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

if (unwrapped instanceof ElasticsearchStatusException) {
ElasticsearchStatusException ex = (ElasticsearchStatusException) unwrapped;
if (ex.status().equals(RestStatus.TOO_MANY_REQUESTS)) {
if (unwrapped instanceof ElasticsearchException ex) {
Copy link
Member

Choose a reason for hiding this comment

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

Java 17 🥳

ElasticsearchStatusException ex = (ElasticsearchStatusException) unwrapped;
if (ex.status().equals(RestStatus.TOO_MANY_REQUESTS)) {
if (unwrapped instanceof ElasticsearchException ex) {
if (FAILURE_STATUSES.contains(ex.status())) {
Copy link
Member

Choose a reason for hiding this comment

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

Looking at the changes in FillMaskProcessor it makes more sense for individual processors to decide which errors are exceptions and which are WarningInferenceResults. I think this logic and be removed as the processor and deployment manager know best what is an error

Copy link
Member Author

Choose a reason for hiding this comment

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

@davidkyle this assumes that we catch and return a warning down at the task level. I can do that but its a larger refactor.

Copy link
Member

@davidkyle davidkyle left a comment

Choose a reason for hiding this comment

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

LGTM

@benwtrent benwtrent added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Dec 8, 2021
@elasticsearchmachine elasticsearchmachine merged commit 2dec141 into elastic:master Dec 8, 2021
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.0 Commit could not be cherrypicked due to conflicts

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

benwtrent added a commit to benwtrent/elasticsearch that referenced this pull request Dec 8, 2021
elastic#81475)

This updates the following scenarios and causes NER/native inference to
fail and not write a warning:  - missing vocabulary values  - missing
model/deployment  - native process failed  - native process stopping  -
request timed out  - misconfigured inference task update type
elasticsearchmachine pushed a commit that referenced this pull request Dec 8, 2021
…r types (#81475) (#81546)

* [ML] fail inference processor more consistently on certain error types (#81475)

This updates the following scenarios and causes NER/native inference to
fail and not write a warning:  - missing vocabulary values  - missing
model/deployment  - native process failed  - native process stopping  -
request timed out  - misconfigured inference task update type

* fixing for backport

* fixing backport

* fixing backport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >bug :ml Machine learning Team:ML Meta label for the ML team v8.0.0-rc2 v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants