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] File data visualizer: filter running inference endpoints #196577

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

jgowdyelastic
Copy link
Member

@jgowdyelastic jgowdyelastic commented Oct 16, 2024

When listing the inference endpoints available for the semantic text field, we should only list ones where the underlying model is deployed, otherwise the ingest can fail due to a timeout as the model is being deployed and an ML node spun up in the background.

image

This PR adds a check to the data_visualizer/inference_endpoints endpoint to ensure only sparse_embedding and text_embedding types are used and they have at least one allocation.
NOTE, the allocation check is currently commented out waiting on an es change. elastic/elasticsearch#115095

Also renames the endpoint from data_visualizer/inference_services -> data_visualizer/inference_endpoints
And renames variables which were incorrectly named "service" rather than "endpoint"

@jgowdyelastic jgowdyelastic self-assigned this Oct 17, 2024
@jgowdyelastic jgowdyelastic added bug Fixes for quality problems that affect the customer experience :ml release_note:skip Skip the PR/issue when compiling release notes v9.0.0 v8.16.0 v8.17.0 Feature:File and Index Data Viz ML file and index data visualizer Feature:File Upload labels Oct 17, 2024
@jgowdyelastic jgowdyelastic marked this pull request as ready for review October 17, 2024 13:03
@jgowdyelastic jgowdyelastic requested a review from a team as a code owner October 17, 2024 13:03
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@jgowdyelastic jgowdyelastic changed the title [ML] File data visualizer filter running inference services [ML] File data visualizer: filter running inference endpoints Oct 17, 2024
@jgowdyelastic jgowdyelastic added the backport:version Backport to applied version labels label Oct 17, 2024
@jeffvestal
Copy link

Another thing that would be nice to filter is only to show inference APIs for embedding services.
However, this may be tricky with external services.

CleanShot 2024-10-17 at 14 42 12@2x

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested and LGTM.

One observation - in my local testing, uploading a PDF file (500 lines, 160KB) for the first time can take a couple of minutes - presumably as a new .elser-2 deployment is created. During this time, the progress page stays in step 4 (Uploading data) with no visible sign of anything happening. Is there anything we can do to improve the messaging here to provide more details on what is happening?

@jgowdyelastic jgowdyelastic marked this pull request as draft October 18, 2024 10:01
@peteharverson peteharverson self-requested a review October 18, 2024 10:33
@jgowdyelastic
Copy link
Member Author

@jeffvestal

Another thing that would be nice to filter is only to show inference APIs for embedding services.
However, this may be tricky with external services.

I'm now filtering for sparse_embedding and text_embedding types

@jeffvestal
Copy link

I'm now filtering for sparse_embedding and text_embedding types

Nice! Thanks

@jgowdyelastic
Copy link
Member Author

jgowdyelastic commented Oct 18, 2024

One observation - in my local testing, uploading a PDF file (500 lines, 160KB) for the first time can take a couple of minutes - presumably as a new .elser-2 deployment is created. During this time, the progress page stays in step 4 (Uploading data) with no visible sign of anything happening. Is there anything we can do to improve the messaging here to provide more details on what is happening?

There will be a change going into es for 8.16 which fixes num_allocations. We can use that to ensure only deployed models are available for use. This will mean the pause you're seeing here for download/deployment will not happen.

In the future we could add a step to trigger this auto deployment by calling the infer endpoint during upload and report the status of the download and deployment as an addition step in the upload progress. #196696

@jgowdyelastic jgowdyelastic marked this pull request as ready for review October 18, 2024 15:17
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #60 / Rule execution logic API Detection Engine - Execution logic @ess @serverless Indicator match type rules, alert suppression Code execution path: events count is smaller than threats count should suppress an alert on real rule executions

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dataVisualizer 614.0KB 614.0KB +2.0B

History

cc @jgowdyelastic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience Feature:File and Index Data Viz ML file and index data visualizer Feature:File Upload :ml release_note:skip Skip the PR/issue when compiling release notes v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants