forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ML] Trained Models: Optimize trained models Kibana API (elastic#200977)
## Summary Closes elastic#191939 Closes elastic#175220 Adds various optimizations for the Trained Models page: --- - Creates a new Kibana `/trained_models_list` endpoint responsible for fetching complete data for the Trained Model UI page, including pipelines, indices and stats. Before the Trained Models page required 3 endpoints. The new `trained_models_list` replaces them, reducing the overall latency. <img width="715" alt="Screenshot 2024-12-02 at 16 18 32" src="https://github.com/user-attachments/assets/34bebbdc-ae80-4e08-8512-199c57cb5b54"> --- - Optimized fetching of pipelines, indices and stats, reducing the number of API calls to ES Several issues with the old endpoint stemmed from the with_indices flag. This flag triggered a method designed for the Model Map feature, which involved fetching a complete list of pipelines, iterating over each model, retrieving index settings multiple times, and obtaining both index content and a full list of transforms. The new endpoint solves these issues by fetching only the necessary information for the Trained Model page with minimal calls to Elasticsearch. #### APM transaction with a new endpoint <img width="1822" alt="image" src="https://github.com/user-attachments/assets/55e4a5f0-e571-46a2-b7ad-5b5a6fc44ceb"> #### APM transaction with an old endpoint https://github.com/user-attachments/assets/c9d62ddb-5e13-4ac1-9cbf-d685fbed7808 --- - Improves type definitions for different model types ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
- Loading branch information
1 parent
dfab33f
commit 1270d00
Showing
45 changed files
with
1,239 additions
and
1,051 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.