From 7ff26495e125f787121149b7072268e826aff5ab Mon Sep 17 00:00:00 2001 From: Samiul Monir Date: Wed, 6 Nov 2024 08:30:04 -0500 Subject: [PATCH] Reverting back to deployment id to point to inference id instead of model id --- .../hooks/use_details_page_mappings_model_management.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.ts b/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.ts index 9ad3e74e96a9e..7a8d9f526b9f0 100644 --- a/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.ts +++ b/x-pack/plugins/index_management/public/hooks/use_details_page_mappings_model_management.ts @@ -34,9 +34,9 @@ const getCustomInferenceIdMap = ( ? { trainedModelId: model.service_settings.model_id, isDeployable: model.service === Service.elser || model.service === Service.elasticsearch, - isDeployed: modelStatsById[model.service_settings.model_id]?.state === 'started', + isDeployed: modelStatsById[model.inference_id]?.state === 'started', isDownloading: Boolean(downloadStates[model.service_settings.model_id]), - modelStats: modelStatsById[model.service_settings.model_id], + modelStats: modelStatsById[model.inference_id], } : { trainedModelId: '', @@ -104,7 +104,7 @@ export const useDetailsPageMappingsModelManagement = () => { Record >((acc, { model_id: modelId, deployment_stats: stats }) => { if (modelId && stats) { - acc[modelId] = stats; + acc[stats.deployment_id] = stats; } return acc; }, {}) || {};