Skip to content
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] make trained model rest APIs cancellable #88009

Merged

Conversation

benwtrent
Copy link
Member

@benwtrent benwtrent commented Jun 24, 2022

This change makes all the trained model APIs cancellable, and addresses the handful of APIs that rely on our abstract resource structure.

closes: #87931
relates: #88010

@elasticmachine elasticmachine added the Team:ML Meta label for the ML team label Jun 24, 2022
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@dimitris-athanasiou dimitris-athanasiou left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -1174,30 +1208,6 @@ private Set<String> matchedResourceIds(String[] tokens) {
return Collections.unmodifiableSet(matchedModels);
}

private static <T> T handleSearchItem(
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@benwtrent benwtrent merged commit 71ab4c4 into elastic:master Jun 24, 2022
@benwtrent benwtrent deleted the feature/ml-trained-model-stats-cancellable branch June 24, 2022 17:25
elasticsearchmachine pushed a commit that referenced this pull request Jul 19, 2022
API cancellation was erroneously using the node-name for the parent task
id. Task ids are constructed via the node ID, not name. 

This fixes that bug.

related to:   - #88030  -
#88142  -
#88009
benwtrent added a commit that referenced this pull request Jul 20, 2022
When an infer request is made, it may or may not be queued for later execution. If the caller making the inference request stops listening for the result, we should not execute action.

This commit allows for infer requests made to deployed models to be cancelled even after they are queued for inference.

Related to: #88009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:ml Machine learning >non-issue Team:ML Meta label for the ML team v8.4.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make GetTrainedModelsStatsAction cancellable
3 participants