mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[ML] Fix Allocation rendering for failed deployments (#174882)
## Summary Fixes "Allocation" rendering for failed deployments of trained models. _We should also update the type definition in elasticsearch specification marking `number_of_allocations` and `threads_per_allocation` as optional for [Get Trained Model Stats](https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models-stats.html) endpoint._ #### How to reproduce 1. Start a model deployment 2. Find a Process ID ``` ps -ef | grep pytorch_inference ``` 3. Kill the inference process manually ``` kill -9 <PID> ``` Before:  After: <img width="1732" alt="image" src="be970ae8
-f4a2-4b06-aff4-f27ce374178c">
This commit is contained in:
parent
1172c0ec09
commit
2a61da251b
2 changed files with 8 additions and 2 deletions
|
@ -203,8 +203,8 @@ export interface AllocatedModel {
|
|||
number_of_pending_requests: number;
|
||||
start_time: number;
|
||||
throughput_last_minute: number;
|
||||
number_of_allocations: number;
|
||||
threads_per_allocation: number;
|
||||
number_of_allocations?: number;
|
||||
threads_per_allocation?: number;
|
||||
error_count?: number;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -118,6 +118,12 @@ export const AllocatedModels: FC<AllocatedModelsProps> = ({
|
|||
truncateText: false,
|
||||
'data-test-subj': 'mlAllocatedModelsTableAllocation',
|
||||
render: (v: AllocatedModel) => {
|
||||
if (
|
||||
v.node.number_of_allocations === undefined ||
|
||||
v.node.threads_per_allocation === undefined
|
||||
) {
|
||||
return '-';
|
||||
}
|
||||
return `${v.node.number_of_allocations} * ${v.node.threads_per_allocation}`;
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue