Get trained models usage info Added in 7.10.0
You can get usage information for multiple trained models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
Path parameters
-
The unique identifier of the trained model or a model alias. It can be a comma-separated list or a wildcard expression.
Query parameters
-
allow_no_match boolean
Specifies what to do when the request:
- Contains wildcard expressions and there are no models that match.
- Contains the _all string or no identifiers and there are no matches.
- Contains wildcard expressions and there are only partial matches.
If true, it returns an empty array when there are no matches and the subset of results when there are partial matches.
-
from number
Skips the specified number of models.
-
size number
Specifies the maximum number of models to obtain.
GET /_ml/trained_models/{model_id}/_stats
curl \
-X GET http://api.example.com/_ml/trained_models/{model_id}/_stats
Response examples (200)
{
"count": 42.0,
"trained_model_stats": [
{
"deployment_stats": {
"allocation_status": {
"allocation_count": 42.0,
"state": "started",
"target_allocation_count": 42.0
},
"": 42.0,
"deployment_id": "string",
"error_count": 42.0,
"inference_count": 42.0,
"model_id": "string",
"nodes": [
{
"error_count": 42.0,
"inference_count": 42.0,
"last_access": 42.0,
"node": {},
"number_of_allocations": 42.0,
"number_of_pending_requests": 42.0,
"rejection_execution_count": 42.0,
"routing_state": {},
"threads_per_allocation": 42.0,
"timeout_count": 42.0
}
],
"number_of_allocations": 42.0,
"queue_capacity": 42.0,
"rejected_execution_count": 42.0,
"reason": "string",
"state": "started",
"threads_per_allocation": 42.0,
"timeout_count": 42.0
},
"inference_stats": {
"cache_miss_count": 42.0,
"failure_count": 42.0,
"inference_count": 42.0,
"missing_all_fields_count": 42.0,
"": 42.0
},
"ingest": {
"additionalProperty1": {},
"additionalProperty2": {}
},
"model_id": "string",
"model_size_stats": {
"": 42.0
},
"pipeline_count": 42.0
}
]
}