2019-12-18 03:10:12 -05:00
|
|
|
[role="xpack"]
|
|
|
|
[testenv="basic"]
|
|
|
|
[[delete-inference]]
|
2020-07-20 16:06:29 -04:00
|
|
|
= Delete {infer} trained model API
|
2019-12-18 03:10:12 -05:00
|
|
|
[subs="attributes"]
|
|
|
|
++++
|
|
|
|
<titleabbrev>Delete {infer} trained model</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
Deletes an existing trained {infer} model that is currently not referenced by an
|
|
|
|
ingest pipeline.
|
|
|
|
|
|
|
|
experimental[]
|
|
|
|
|
|
|
|
|
|
|
|
[[ml-delete-inference-request]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-request-title}
|
2019-12-18 03:10:12 -05:00
|
|
|
|
|
|
|
`DELETE _ml/inference/<model_id>`
|
|
|
|
|
|
|
|
|
|
|
|
[[ml-delete-inference-prereq]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-prereq-title}
|
2019-12-18 03:10:12 -05:00
|
|
|
|
2020-01-09 04:44:07 -05:00
|
|
|
If the {es} {security-features} are enabled, you must have the following built-in roles or equivalent privileges:
|
|
|
|
|
|
|
|
* `machine_learning_admin`
|
2020-04-06 09:45:08 -04:00
|
|
|
* `kibana_admin` (UI only)
|
2020-01-09 04:44:07 -05:00
|
|
|
|
|
|
|
For more information, see <<security-privileges>> and <<built-in-roles>>.
|
2019-12-18 03:10:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
[[ml-delete-inference-path-params]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-path-parms-title}
|
2019-12-18 03:10:12 -05:00
|
|
|
|
|
|
|
`<model_id>`::
|
|
|
|
(Optional, string)
|
2020-06-01 16:46:15 -04:00
|
|
|
include::{es-repo-dir}/ml/ml-shared.asciidoc[tag=model-id]
|
2019-12-18 03:10:12 -05:00
|
|
|
|
|
|
|
|
|
|
|
[[ml-delete-inference-response-codes]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-response-codes-title}
|
2019-12-18 03:10:12 -05:00
|
|
|
|
|
|
|
`409`::
|
|
|
|
The code indicates that the trained {infer} model is referenced by an ingest
|
|
|
|
pipeline and cannot be deleted.
|
|
|
|
|
|
|
|
|
|
|
|
[[ml-delete-inference-example]]
|
2020-07-20 16:06:29 -04:00
|
|
|
== {api-examples-title}
|
2019-12-18 03:10:12 -05:00
|
|
|
|
|
|
|
The following example deletes the `regression-job-one-1574775307356` trained
|
|
|
|
model:
|
|
|
|
|
|
|
|
[source,console]
|
|
|
|
--------------------------------------------------
|
|
|
|
DELETE _ml/inference/regression-job-one-1574775307356
|
|
|
|
--------------------------------------------------
|
|
|
|
// TEST[skip:TBD]
|
|
|
|
|
|
|
|
The API returns the following result:
|
|
|
|
|
|
|
|
|
|
|
|
[source,console-result]
|
|
|
|
----
|
|
|
|
{
|
|
|
|
"acknowledged" : true
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|