Skip to content

Commit

Permalink
[ML] File upload: enabling check for model allocations (elastic#197395)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
jgowdyelastic committed Oct 24, 2024
1 parent 8e5c5fa commit 7565192
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 7565192

Please sign in to comment.