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: only list sparse_embedding and text_embedding inference endpoints #196577

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 sparse_embedding and text_embedding types.

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
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.

Latest changes LGTM. The PR title and description just need edits as this now is only filtering for sparse_embedding and text_embedding types (and not if they are deployed).

@jgowdyelastic jgowdyelastic changed the title [ML] File data visualizer: filter running inference endpoints [ML] File data visualizer: only list sparse_embedding and text_embedding inference endpoints Oct 21, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

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 615.7KB 615.7KB +2.0B

History

cc @jgowdyelastic

@jgowdyelastic jgowdyelastic merged commit fb412ca into elastic:main Oct 21, 2024
25 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11438639445

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 21, 2024
…ing inference endpoints (elastic#196577)

When listing the inference endpoints available for the semantic text
field, we should only list `sparse_embedding` and `text_embedding`
types.

<img width="353" alt="image"
src="https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75">

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"

(cherry picked from commit fb412ca)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 21, 2024
…ing inference endpoints (elastic#196577)

When listing the inference endpoints available for the semantic text
field, we should only list `sparse_embedding` and `text_embedding`
types.

<img width="353" alt="image"
src="https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75">

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"

(cherry picked from commit fb412ca)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 21, 2024
…_embedding inference endpoints (#196577) (#197030)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[ML] File data visualizer: only list sparse_embedding and
text_embedding inference endpoints
(#196577)](#196577)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-21T10:56:05Z","message":"[ML]
File data visualizer: only list sparse_embedding and text_embedding
inference endpoints (#196577)\n\nWhen listing the inference endpoints
available for the semantic text\r\nfield, we should only list
`sparse_embedding` and `text_embedding`\r\ntypes.\r\n\r\n<img
width=\"353\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75\">\r\n\r\n\r\n\r\nThis
PR adds a check to the `data_visualizer/inference_endpoints`\r\nendpoint
to ensure only `sparse_embedding` and `text_embedding` types\r\nare used
and they have at least one allocation.\r\nNOTE, the allocation check is
currently commented out waiting on an es\r\nchange.
https://github.com/elastic/elasticsearch/pull/115095\r\n\r\nAlso renames
the endpoint from `data_visualizer/inference_services`
->\r\n`data_visualizer/inference_endpoints`\r\nAnd renames variables
which were incorrectly named \"service\" rather
than\r\n\"endpoint\"","sha":"fb412ca0b7dfb997f2f84da62a12f32d3012ffb0","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug",":ml","release_note:skip","Feature:File
and Index Data Viz","Feature:File
Upload","v9.0.0","v8.16.0","backport:version","v8.17.0"],"title":"[ML]
File data visualizer: only list sparse_embedding and text_embedding
inference
endpoints","number":196577,"url":"https://github.com/elastic/kibana/pull/196577","mergeCommit":{"message":"[ML]
File data visualizer: only list sparse_embedding and text_embedding
inference endpoints (#196577)\n\nWhen listing the inference endpoints
available for the semantic text\r\nfield, we should only list
`sparse_embedding` and `text_embedding`\r\ntypes.\r\n\r\n<img
width=\"353\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75\">\r\n\r\n\r\n\r\nThis
PR adds a check to the `data_visualizer/inference_endpoints`\r\nendpoint
to ensure only `sparse_embedding` and `text_embedding` types\r\nare used
and they have at least one allocation.\r\nNOTE, the allocation check is
currently commented out waiting on an es\r\nchange.
https://github.com/elastic/elasticsearch/pull/115095\r\n\r\nAlso renames
the endpoint from `data_visualizer/inference_services`
->\r\n`data_visualizer/inference_endpoints`\r\nAnd renames variables
which were incorrectly named \"service\" rather
than\r\n\"endpoint\"","sha":"fb412ca0b7dfb997f2f84da62a12f32d3012ffb0"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196577","number":196577,"mergeCommit":{"message":"[ML]
File data visualizer: only list sparse_embedding and text_embedding
inference endpoints (#196577)\n\nWhen listing the inference endpoints
available for the semantic text\r\nfield, we should only list
`sparse_embedding` and `text_embedding`\r\ntypes.\r\n\r\n<img
width=\"353\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75\">\r\n\r\n\r\n\r\nThis
PR adds a check to the `data_visualizer/inference_endpoints`\r\nendpoint
to ensure only `sparse_embedding` and `text_embedding` types\r\nare used
and they have at least one allocation.\r\nNOTE, the allocation check is
currently commented out waiting on an es\r\nchange.
https://github.com/elastic/elasticsearch/pull/115095\r\n\r\nAlso renames
the endpoint from `data_visualizer/inference_services`
->\r\n`data_visualizer/inference_endpoints`\r\nAnd renames variables
which were incorrectly named \"service\" rather
than\r\n\"endpoint\"","sha":"fb412ca0b7dfb997f2f84da62a12f32d3012ffb0"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <[email protected]>
kibanamachine added a commit that referenced this pull request Oct 21, 2024
…embedding inference endpoints (#196577) (#197031)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ML] File data visualizer: only list sparse_embedding and
text_embedding inference endpoints
(#196577)](#196577)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"James
Gowdy","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-21T10:56:05Z","message":"[ML]
File data visualizer: only list sparse_embedding and text_embedding
inference endpoints (#196577)\n\nWhen listing the inference endpoints
available for the semantic text\r\nfield, we should only list
`sparse_embedding` and `text_embedding`\r\ntypes.\r\n\r\n<img
width=\"353\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75\">\r\n\r\n\r\n\r\nThis
PR adds a check to the `data_visualizer/inference_endpoints`\r\nendpoint
to ensure only `sparse_embedding` and `text_embedding` types\r\nare used
and they have at least one allocation.\r\nNOTE, the allocation check is
currently commented out waiting on an es\r\nchange.
https://github.com/elastic/elasticsearch/pull/115095\r\n\r\nAlso renames
the endpoint from `data_visualizer/inference_services`
->\r\n`data_visualizer/inference_endpoints`\r\nAnd renames variables
which were incorrectly named \"service\" rather
than\r\n\"endpoint\"","sha":"fb412ca0b7dfb997f2f84da62a12f32d3012ffb0","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug",":ml","release_note:skip","Feature:File
and Index Data Viz","Feature:File
Upload","v9.0.0","v8.16.0","backport:version","v8.17.0"],"title":"[ML]
File data visualizer: only list sparse_embedding and text_embedding
inference
endpoints","number":196577,"url":"https://github.com/elastic/kibana/pull/196577","mergeCommit":{"message":"[ML]
File data visualizer: only list sparse_embedding and text_embedding
inference endpoints (#196577)\n\nWhen listing the inference endpoints
available for the semantic text\r\nfield, we should only list
`sparse_embedding` and `text_embedding`\r\ntypes.\r\n\r\n<img
width=\"353\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75\">\r\n\r\n\r\n\r\nThis
PR adds a check to the `data_visualizer/inference_endpoints`\r\nendpoint
to ensure only `sparse_embedding` and `text_embedding` types\r\nare used
and they have at least one allocation.\r\nNOTE, the allocation check is
currently commented out waiting on an es\r\nchange.
https://github.com/elastic/elasticsearch/pull/115095\r\n\r\nAlso renames
the endpoint from `data_visualizer/inference_services`
->\r\n`data_visualizer/inference_endpoints`\r\nAnd renames variables
which were incorrectly named \"service\" rather
than\r\n\"endpoint\"","sha":"fb412ca0b7dfb997f2f84da62a12f32d3012ffb0"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196577","number":196577,"mergeCommit":{"message":"[ML]
File data visualizer: only list sparse_embedding and text_embedding
inference endpoints (#196577)\n\nWhen listing the inference endpoints
available for the semantic text\r\nfield, we should only list
`sparse_embedding` and `text_embedding`\r\ntypes.\r\n\r\n<img
width=\"353\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/95526f2b-e293-4e01-be79-b87e1ecb9a75\">\r\n\r\n\r\n\r\nThis
PR adds a check to the `data_visualizer/inference_endpoints`\r\nendpoint
to ensure only `sparse_embedding` and `text_embedding` types\r\nare used
and they have at least one allocation.\r\nNOTE, the allocation check is
currently commented out waiting on an es\r\nchange.
https://github.com/elastic/elasticsearch/pull/115095\r\n\r\nAlso renames
the endpoint from `data_visualizer/inference_services`
->\r\n`data_visualizer/inference_endpoints`\r\nAnd renames variables
which were incorrectly named \"service\" rather
than\r\n\"endpoint\"","sha":"fb412ca0b7dfb997f2f84da62a12f32d3012ffb0"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: James Gowdy <[email protected]>
jgowdyelastic added a commit that referenced this pull request Oct 24, 2024
Enables the previously commented out check for `num_allocations` when
listing the inference endpoints.

The adaptive allocation count can drop to 0, but it is still valid for
use. Uploading a file will cause it to be re-deployed.

Related to es PRs elastic/elasticsearch#115233
and elastic/elasticsearch#115095

Follow on from #196577
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 24, 2024
Enables the previously commented out check for `num_allocations` when
listing the inference endpoints.

The adaptive allocation count can drop to 0, but it is still valid for
use. Uploading a file will cause it to be re-deployed.

Related to es PRs elastic/elasticsearch#115233
and elastic/elasticsearch#115095

Follow on from elastic#196577

(cherry picked from commit 66b2447)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 24, 2024
Enables the previously commented out check for `num_allocations` when
listing the inference endpoints.

The adaptive allocation count can drop to 0, but it is still valid for
use. Uploading a file will cause it to be re-deployed.

Related to es PRs elastic/elasticsearch#115233
and elastic/elasticsearch#115095

Follow on from elastic#196577

(cherry picked from commit 66b2447)
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.

5 participants