Skip to content

Commit

Permalink
[8.16] [ML] File upload: enabling check for model allocations (#197395)…
Browse files Browse the repository at this point in the history
… (#197677)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[ML] File upload: enabling check for model allocations
(#197395)](#197395)

<!--- 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-24T15:33:36Z","message":"[ML]
File upload: enabling check for model allocations (#197395)\n\nEnables
the previously commented out check for `num_allocations` when\r\nlisting
the inference endpoints.\r\n\r\nThe adaptive allocation count can drop
to 0, but it is still valid for\r\nuse. Uploading a file will cause it
to be re-deployed.\r\n\r\nRelated to es PRs
https://github.com/elastic/elasticsearch/pull/115233\r\nand
https://github.com/elastic/elasticsearch/pull/115095\r\n\r\nFollow on
from
https://github.com/elastic/kibana/pull/196577","sha":"66b2447fe7879dec1ede5c5cd3aea9b34ae1fad9","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement",":ml","Feature:File
and Index Data Viz","Feature:File
Upload","v9.0.0","v8.16.0","backport:version","v8.17.0"],"title":"[ML]
File upload: enabling check for model
allocations","number":197395,"url":"https://github.com/elastic/kibana/pull/197395","mergeCommit":{"message":"[ML]
File upload: enabling check for model allocations (#197395)\n\nEnables
the previously commented out check for `num_allocations` when\r\nlisting
the inference endpoints.\r\n\r\nThe adaptive allocation count can drop
to 0, but it is still valid for\r\nuse. Uploading a file will cause it
to be re-deployed.\r\n\r\nRelated to es PRs
https://github.com/elastic/elasticsearch/pull/115233\r\nand
https://github.com/elastic/elasticsearch/pull/115095\r\n\r\nFollow on
from
https://github.com/elastic/kibana/pull/196577","sha":"66b2447fe7879dec1ede5c5cd3aea9b34ae1fad9"}},"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/197395","number":197395,"mergeCommit":{"message":"[ML]
File upload: enabling check for model allocations (#197395)\n\nEnables
the previously commented out check for `num_allocations` when\r\nlisting
the inference endpoints.\r\n\r\nThe adaptive allocation count can drop
to 0, but it is still valid for\r\nuse. Uploading a file will cause it
to be re-deployed.\r\n\r\nRelated to es PRs
https://github.com/elastic/elasticsearch/pull/115233\r\nand
https://github.com/elastic/elasticsearch/pull/115095\r\n\r\nFollow on
from
https://github.com/elastic/kibana/pull/196577","sha":"66b2447fe7879dec1ede5c5cd3aea9b34ae1fad9"}},{"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]>
  • Loading branch information
kibanamachine and jgowdyelastic authored Oct 24, 2024
1 parent bd6f22b commit 97d2fdf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x-pack/plugins/data_visualizer/server/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ export function routes(coreSetup: CoreSetup<StartDeps, unknown>, logger: Logger)

const filteredInferenceEndpoints = endpoints.filter((endpoint) => {
return (
endpoint.task_type === 'sparse_embedding' || endpoint.task_type === 'text_embedding'
// TODO: add this back in when the fix has made it into es in 8.16
// && endpoint.service_settings.num_allocations > 0
(endpoint.task_type === 'sparse_embedding' ||
endpoint.task_type === 'text_embedding') &&
endpoint.service_settings.num_allocations >= 0
);
});

Expand Down

0 comments on commit 97d2fdf

Please sign in to comment.