Get trained models usage info Added in 7.10.0

GET /_ml/trained_models/_stats

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.

Query parameters

  • 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.

Responses

GET /_ml/trained_models/_stats
curl \
 -X GET http://api.example.com/_ml/trained_models/_stats
Response examples (200)
{
  "count": 42.0,
  "trained_model_stats": [
    {
      "deployment_stats": {
        "adaptive_allocations": {
          "enabled": true,
          "min_number_of_allocations": 42.0,
          "max_number_of_allocations": 42.0
        },
        "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,
            "inference_cache_hit_count": 42.0,
            "inference_cache_hit_count_last_minute": 42.0,
            "node": {},
            "number_of_allocations": 42.0,
            "number_of_pending_requests": 42.0,
            "peak_throughput_per_minute": 42.0,
            "rejection_execution_count": 42.0,
            "routing_state": {},
            "threads_per_allocation": 42.0,
            "throughput_last_minute": 42.0,
            "timeout_count": 42.0
          }
        ],
        "number_of_allocations": 42.0,
        "peak_throughput_per_minute": 42.0,
        "priority": "normal",
        "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
    }
  ]
}