原文地址: https://www.elastic.co/guide/en/elasticsearch/reference/7.7/delete-inference.html, 原文档版权归 www.elastic.co 所有

Delete inference trained model APIedit

Deletes an existing trained inference model that is currently not referenced by an ingest pipeline.

This functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.

Requestedit

DELETE _ml/inference/<model_id>

Prerequisitesedit

If the Elasticsearch security features are enabled, you must have the following built-in roles or equivalent privileges:

  • machine_learning_admin
  • kibana_admin (UI only)

For more information, see Security privileges and Built-in roles.

Path parametersedit

<model_id>
(Optional, string) The unique identifier of the trained inference model.

Response codesedit

409
The code indicates that the trained inference model is referenced by an ingest pipeline and cannot be deleted.

Examplesedit

The following example deletes the regression-job-one-1574775307356 trained model:

DELETE _ml/inference/regression-job-one-1574775307356

The API returns the following result:

{
  "acknowledged" : true
}