From 4ed78bf6f970b79abb469d5e7c1b92309a2f8b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 16 Dec 2019 11:33:08 +0100 Subject: [PATCH 01/10] [DOCS] Adds GET, GET stats and DELETE inference APIs. --- .../apis/delete-trained-model.asciidoc | 59 +++++++ .../apis/get-trained-model-stats.asciidoc | 134 ++++++++++++++++ .../apis/get-trained-model.asciidoc | 149 ++++++++++++++++++ .../ml/df-analytics/apis/index.asciidoc | 7 + docs/reference/ml/ml-shared.asciidoc | 15 ++ 5 files changed, 364 insertions(+) create mode 100644 docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc create mode 100644 docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc create mode 100644 docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc diff --git a/docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc b/docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc new file mode 100644 index 0000000000000..4eb1fb05b4e61 --- /dev/null +++ b/docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc @@ -0,0 +1,59 @@ +[role="xpack"] +[testenv="platinum"] +[[delete-inference]] +=== Delete trained model API +[subs="attributes"] +++++ +Delete trained model +++++ + +Deletes an existing trained {dfanalytics} model that is currently not referenced +by an ingest pipeline. + +experimental[] + + +[[ml-delete-inference-request]] +==== {api-request-title} + +`DELETE _ml/inference/` + + +[[ml-delete-inference-prereq]] +==== {api-prereq-title} + +* You must have `machine_learning_admin` built-in role to use this API. For more +information, see <> and <>. + + +[[ml-delete-inference-path-params]] +==== {api-path-parms-title} + +``:: +(Optional, string) +include::{docdir}/ml/ml-shared.asciidoc[tag=model-id] + + +[[ml-delete-inference-example]] +==== {api-examples-title} + +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 +} +---- + + diff --git a/docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc b/docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc new file mode 100644 index 0000000000000..28dc7b48feaa1 --- /dev/null +++ b/docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc @@ -0,0 +1,134 @@ +[role="xpack"] +[testenv="platinum"] +[[get-inference-stats]] +=== Get trained model statistics API +[subs="attributes"] +++++ +Get trained model stats +++++ + +Retrieves usage information for trained {dfanalytics} models. + +experimental[] + + +[[ml-get-inference-stats-request]] +==== {api-request-title} + +`GET _ml/inference/_stats` + + +`GET _ml/inference/_all/_stats` + + +`GET _ml/inference//_stats` + + +`GET _ml/inference/,/_stats` + + +`GET _ml/inference/,/_stats` + + +[[ml-get-inference-stats-prereq]] +==== {api-prereq-title} + +* You must have `monitor_ml` privilege to use this API. For more information, +see <> and <>. + + +[[ml-get-inference-stats-desc]] +==== {api-description-title} + +You can get iusage nformation for multiple trained models in a single API +request by using a comma-separated list of model IDs or a wildcard expression. + + +[[ml-get-inference-stats-path-params]] +==== {api-path-parms-title} + +``:: +(Optional, string) +include::{docdir}/ml/ml-shared.asciidoc[tag=model-id] + + +[[ml-get-inference-stats-query-params]] +==== {api-query-parms-title} + +`allow_no_match`:: +(Optional, boolean) +include::{docdir}/ml/ml-shared.asciidoc[tag=allow-no-match] + +`from`:: +(Optional, integer) +include::{docdir}/ml/ml-shared.asciidoc[tag=from] + +`size`:: +(Optional, integer) +include::{docdir}/ml/ml-shared.asciidoc[tag=size] + + +[[ml-get-inference-stats-response-codes]] +==== {api-response-codes-title} + +`404` (Missing resources):: + If `allow_no_match` is `false`, this code indicates that there are no + resources that match the request or only partial matches for the request. + + +[[ml-get-inference-stats-example]] +==== {api-examples-title} + +The following example gets usage information for all the trained models: + +[source,console] +-------------------------------------------------- +GET _ml/inference/_stats +-------------------------------------------------- +// TEST[skip:TBD] + + +The API returns the following results: + +[source,console-result] +---- +{ + "count": 2, + "trained_model_stats": [ + { + "model_id": "flight-delay-prediction-1574775339910", + "pipeline_count": 0 + }, + { + "model_id": "regression-job-one-1574775307356", + "pipeline_count": 1, + "ingest": { + "total": { + "count": 178, + "time_in_millis": 8, + "current": 0, + "failed": 0 + }, + "pipelines": { + "flight-delay": { + "count": 178, + "time_in_millis": 8, + "current": 0, + "failed": 0, + "processors": [ + { + "inference": { + "type": "inference", + "stats": { + "count": 178, + "time_in_millis": 7, + "current": 0, + "failed": 0 + } + } + } + ] + } + } + } + } + ] +} +---- +// NOTCONSOLE \ No newline at end of file diff --git a/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc b/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc new file mode 100644 index 0000000000000..4910834f30823 --- /dev/null +++ b/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc @@ -0,0 +1,149 @@ +[role="xpack"] +[testenv="platinum"] +[[get-inference]] +=== Get trained model API +[subs="attributes"] +++++ +Get trained model +++++ + +Retrieves configuration information for a trained {dfanalytics} model. + +experimental[] + + +[[ml-get-inference-request]] +==== {api-request-title} + +`GET _ml/inference/` + + +`GET _ml/inference/` + + +`GET _ml/inference/_all` + + +`GET _ml/inference/,` + + +`GET _ml/inference/` + + +[[ml-get-inference-prereq]] +==== {api-prereq-title} + +* You must have `monitor_ml` privilege to use this API. For more information, +see <> and <>. + + +[[ml-get-inference-desc]] +==== {api-description-title} + +You can get information for multiple trained models in a single API request by +using a comma-separated list of model IDs or a wildcard expression. + + +[[ml-get-inference-path-params]] +==== {api-path-parms-title} + +``:: +(Optional, string) +include::{docdir}/ml/ml-shared.asciidoc[tag=model-id] + + +[[ml-get-inference-query-params]] +==== {api-query-parms-title} + +`allow_no_match`:: +(Optional, boolean) +include::{docdir}/ml/ml-shared.asciidoc[tag=allow-no-match] + +`decompress_definition`:: +(Optional, boolean) +include::{docdir}/ml/ml-shared.asciidoc[tag=decompress-definition] + +`from`:: +(Optional, integer) +include::{docdir}/ml/ml-shared.asciidoc[tag=from] + +`include_model_definition`:: +(Optional, boolean) +include::{docdir}/ml/ml-shared.asciidoc[tag=include-model-definition] + +`size`:: +(Optional, integer) +include::{docdir}/ml/ml-shared.asciidoc[tag=size] + + +[[ml-get-inference-response-codes]] +==== {api-response-codes-title} + +`404` (Missing resources):: + If `allow_no_match` is `false`, this code indicates that there are no + resources that match the request or only partial matches for the request. + + +[[ml-get-inference-example]] +==== {api-examples-title} + +The following example gets configuration information for all the trained models: + +[source,console] +-------------------------------------------------- +GET _ml/inference/ +-------------------------------------------------- +// TEST[skip:TBD] + + +The API returns the following results: + +[source,console-result] +---- +{ + "count" : 2, + "trained_model_configs" : [ + { + "model_id" : "flight-delay-prediction-1574775339910", + "created_by" : "data-frame-analytics", + "version" : "8.0.0", + "create_time_string" : "2019-11-26T13:35:39.910Z", + "create_time" : 1574775339910, + "tags" : [ + "flight-delay-prediction" + ], + "metadata" : { + "analytics_config" : {...} + }, + "input" : { + "field_names" : [...] + }, + "estimated_heap_memory_usage" : "1.5mb", + "estimated_heap_memory_usage_bytes" : 1621768, + "estimated_operations" : 112, + "license_level" : "platinum" + }, + { + "model_id" : "regression-job-one-1574775307356", + "created_by" : "data-frame-analytics", + "version" : "8.0.0", + "create_time_string" : "2019-11-26T13:35:07.356Z", + "create_time" : 1574775307356, + "tags" : [ + "regression-job-one" + ], + "metadata" : { + "analytics_config" : { + ... + } + }, + "input" : { + "field_names" : [ + ... + ] + }, + "estimated_heap_memory_usage" : "2.8mb", + "estimated_heap_memory_usage_bytes" : 2996504, + "estimated_operations" : 79, + "license_level" : "platinum" + } + ] +} +---- +// NOTCONSOLE \ No newline at end of file diff --git a/docs/reference/ml/df-analytics/apis/index.asciidoc b/docs/reference/ml/df-analytics/apis/index.asciidoc index bebd6d3aae820..36434e9fe436d 100644 --- a/docs/reference/ml/df-analytics/apis/index.asciidoc +++ b/docs/reference/ml/df-analytics/apis/index.asciidoc @@ -13,6 +13,9 @@ You can use the following APIs to perform {ml} {dfanalytics} activities. * <> * <> * <> +* <> +* <> +* <> For the `analysis` object resources, check <>. @@ -32,3 +35,7 @@ include::get-dfanalytics-stats.asciidoc[] //SET/START/STOP include::start-dfanalytics.asciidoc[] include::stop-dfanalytics.asciidoc[] +//INFERENCE +include::get-trained-model.asciidoc +include::get-trained-model-stats.asciidoc +include::delete-trained-model.asciidoc diff --git a/docs/reference/ml/ml-shared.asciidoc b/docs/reference/ml/ml-shared.asciidoc index c13b4e903b91e..c80a5575f8874 100644 --- a/docs/reference/ml/ml-shared.asciidoc +++ b/docs/reference/ml/ml-shared.asciidoc @@ -483,6 +483,11 @@ Identifier for the {dfeed}. It can be a {dfeed} identifier or a wildcard expression. end::datafeed-id-wildcard[] +tag::decompress-definition[] +Specifies if the included model definition should be returned as a JSON map or +in a custom compressed format. Defaults to `true`. +end::decompress-definition[] + tag::delayed-data-check-config[] Specifies whether the {dfeed} checks for missing data and the size of the window. For example: `{"enabled": true, "check_window": "1h"}`. @@ -688,6 +693,12 @@ tag::groups[] A list of job groups. A job can belong to no groups or many. end::groups[] +tag::include-model-definition[] +Specifies if the model definition should be returned in the response. Defaults +to `false`. When `true`, only a single model must match the ID patterns +provided, otherwise a bad request is returned. +end::include-model-definition[] + tag::indices[] An array of index names. Wildcards are supported. For example: `["it_ops_metrics", "server*"]`. @@ -828,6 +839,10 @@ recommended value. -- end::mode[] +tag::model-id +The unique identifier of the trained {dfanalytics} model. +end::model-id + tag::model-memory-limit[] The approximate maximum amount of memory resources that are required for analytical processing. Once this limit is approached, data pruning becomes From a4307c6f4ae4994dde9bbfd1bcaab1a1cb9bc899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 16 Dec 2019 11:48:44 +0100 Subject: [PATCH 02/10] [DOCS] Removes snippet. --- .../apis/get-trained-model.asciidoc | 59 +------------------ 1 file changed, 1 insertion(+), 58 deletions(-) diff --git a/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc b/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc index 4910834f30823..d7175422dc4c9 100644 --- a/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc +++ b/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc @@ -89,61 +89,4 @@ The following example gets configuration information for all the trained models: -------------------------------------------------- GET _ml/inference/ -------------------------------------------------- -// TEST[skip:TBD] - - -The API returns the following results: - -[source,console-result] ----- -{ - "count" : 2, - "trained_model_configs" : [ - { - "model_id" : "flight-delay-prediction-1574775339910", - "created_by" : "data-frame-analytics", - "version" : "8.0.0", - "create_time_string" : "2019-11-26T13:35:39.910Z", - "create_time" : 1574775339910, - "tags" : [ - "flight-delay-prediction" - ], - "metadata" : { - "analytics_config" : {...} - }, - "input" : { - "field_names" : [...] - }, - "estimated_heap_memory_usage" : "1.5mb", - "estimated_heap_memory_usage_bytes" : 1621768, - "estimated_operations" : 112, - "license_level" : "platinum" - }, - { - "model_id" : "regression-job-one-1574775307356", - "created_by" : "data-frame-analytics", - "version" : "8.0.0", - "create_time_string" : "2019-11-26T13:35:07.356Z", - "create_time" : 1574775307356, - "tags" : [ - "regression-job-one" - ], - "metadata" : { - "analytics_config" : { - ... - } - }, - "input" : { - "field_names" : [ - ... - ] - }, - "estimated_heap_memory_usage" : "2.8mb", - "estimated_heap_memory_usage_bytes" : 2996504, - "estimated_operations" : 79, - "license_level" : "platinum" - } - ] -} ----- -// NOTCONSOLE \ No newline at end of file +// TEST[skip:TBD] \ No newline at end of file From 3704b69c0386354c5af1a457ed409489162541fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 16 Dec 2019 11:50:41 +0100 Subject: [PATCH 03/10] [DOCS] Adds included files to the index. --- docs/reference/ml/df-analytics/apis/index.asciidoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/reference/ml/df-analytics/apis/index.asciidoc b/docs/reference/ml/df-analytics/apis/index.asciidoc index 36434e9fe436d..511b11229f10f 100644 --- a/docs/reference/ml/df-analytics/apis/index.asciidoc +++ b/docs/reference/ml/df-analytics/apis/index.asciidoc @@ -36,6 +36,6 @@ include::get-dfanalytics-stats.asciidoc[] include::start-dfanalytics.asciidoc[] include::stop-dfanalytics.asciidoc[] //INFERENCE -include::get-trained-model.asciidoc -include::get-trained-model-stats.asciidoc -include::delete-trained-model.asciidoc +include::get-trained-model.asciidoc[] +include::get-trained-model-stats.asciidoc[] +include::delete-trained-model.asciidoc[] From f40c2a47c1b1adf80effb694b2c7725c47b51ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 16 Dec 2019 12:24:52 +0100 Subject: [PATCH 04/10] [DOCS] Fixes model-id definition. --- docs/reference/ml/ml-shared.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/ml/ml-shared.asciidoc b/docs/reference/ml/ml-shared.asciidoc index c80a5575f8874..61a3ea7615281 100644 --- a/docs/reference/ml/ml-shared.asciidoc +++ b/docs/reference/ml/ml-shared.asciidoc @@ -839,9 +839,9 @@ recommended value. -- end::mode[] -tag::model-id +tag::model-id[] The unique identifier of the trained {dfanalytics} model. -end::model-id +end::model-id[] tag::model-memory-limit[] The approximate maximum amount of memory resources that are required for From cc026a4d6c60b68601e1f5371ca68afbb3877da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 16 Dec 2019 14:52:59 +0100 Subject: [PATCH 05/10] [DOCS] Addresses feedback. --- .../ml/df-analytics/apis/delete-trained-model.asciidoc | 6 +++--- .../ml/df-analytics/apis/get-trained-model-stats.asciidoc | 6 +++--- .../ml/df-analytics/apis/get-trained-model.asciidoc | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc b/docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc index 4eb1fb05b4e61..2e28c2960e20d 100644 --- a/docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc +++ b/docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc @@ -1,5 +1,5 @@ [role="xpack"] -[testenv="platinum"] +[testenv="basic"] [[delete-inference]] === Delete trained model API [subs="attributes"] @@ -7,8 +7,8 @@ Delete trained model ++++ -Deletes an existing trained {dfanalytics} model that is currently not referenced -by an ingest pipeline. +Deletes an existing trained {infer} model that is currently not referenced by an +ingest pipeline. experimental[] diff --git a/docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc b/docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc index 28dc7b48feaa1..b0c0e2b4e44cb 100644 --- a/docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc +++ b/docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc @@ -1,5 +1,5 @@ [role="xpack"] -[testenv="platinum"] +[testenv="basic"] [[get-inference-stats]] === Get trained model statistics API [subs="attributes"] @@ -7,7 +7,7 @@ Get trained model stats ++++ -Retrieves usage information for trained {dfanalytics} models. +Retrieves usage information for trained {infer} models. experimental[] @@ -36,7 +36,7 @@ see <> and <>. [[ml-get-inference-stats-desc]] ==== {api-description-title} -You can get iusage nformation for multiple trained models in a single API +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. diff --git a/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc b/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc index d7175422dc4c9..ae996c7d52ed5 100644 --- a/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc +++ b/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc @@ -1,5 +1,5 @@ [role="xpack"] -[testenv="platinum"] +[testenv="basic"] [[get-inference]] === Get trained model API [subs="attributes"] @@ -7,7 +7,7 @@ Get trained model ++++ -Retrieves configuration information for a trained {dfanalytics} model. +Retrieves configuration information for a trained {infer} model. experimental[] From 655d897e8be15191fa2c3ace460d32f8943e7c3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Mon, 16 Dec 2019 15:26:48 +0100 Subject: [PATCH 06/10] Update docs/reference/ml/ml-shared.asciidoc --- docs/reference/ml/ml-shared.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ml/ml-shared.asciidoc b/docs/reference/ml/ml-shared.asciidoc index 61a3ea7615281..88fd2a8ede6a3 100644 --- a/docs/reference/ml/ml-shared.asciidoc +++ b/docs/reference/ml/ml-shared.asciidoc @@ -840,7 +840,7 @@ recommended value. end::mode[] tag::model-id[] -The unique identifier of the trained {dfanalytics} model. +The unique identifier of the trained {infer} model. end::model-id[] tag::model-memory-limit[] From 3fb85e0c7faf81f432fa42353247da72c2982525 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Tue, 17 Dec 2019 09:02:11 +0100 Subject: [PATCH 07/10] Update docs/reference/ml/ml-shared.asciidoc Co-Authored-By: Lisa Cawley --- docs/reference/ml/ml-shared.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ml/ml-shared.asciidoc b/docs/reference/ml/ml-shared.asciidoc index 88fd2a8ede6a3..04231f97522a7 100644 --- a/docs/reference/ml/ml-shared.asciidoc +++ b/docs/reference/ml/ml-shared.asciidoc @@ -484,7 +484,7 @@ expression. end::datafeed-id-wildcard[] tag::decompress-definition[] -Specifies if the included model definition should be returned as a JSON map or +Specifies whether the included model definition should be returned as a JSON map (`true`) or in a custom compressed format. Defaults to `true`. end::decompress-definition[] From 50f64a43e163b760f7b8c33fd709f4316370130f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Tue, 17 Dec 2019 09:02:20 +0100 Subject: [PATCH 08/10] Update docs/reference/ml/ml-shared.asciidoc Co-Authored-By: Lisa Cawley --- docs/reference/ml/ml-shared.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ml/ml-shared.asciidoc b/docs/reference/ml/ml-shared.asciidoc index 04231f97522a7..c7191896e323f 100644 --- a/docs/reference/ml/ml-shared.asciidoc +++ b/docs/reference/ml/ml-shared.asciidoc @@ -485,7 +485,7 @@ end::datafeed-id-wildcard[] tag::decompress-definition[] Specifies whether the included model definition should be returned as a JSON map (`true`) or -in a custom compressed format. Defaults to `true`. +in a custom compressed format (`false`). Defaults to `true`. end::decompress-definition[] tag::delayed-data-check-config[] From a01d64cefdaadd091d13a808dde2f3388d850805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Tue, 17 Dec 2019 10:28:38 +0100 Subject: [PATCH 09/10] [DOCS] Addresses feedback. --- ...doc => delete-inference-trained-model.asciidoc} | 12 ++++++++++-- ... => get-inference-trained-model-stats.asciidoc} | 4 ++-- ...ciidoc => get-inference-trained-model.asciidoc} | 8 ++++++-- docs/reference/ml/df-analytics/apis/index.asciidoc | 14 +++++++++----- 4 files changed, 27 insertions(+), 11 deletions(-) rename docs/reference/ml/df-analytics/apis/{delete-trained-model.asciidoc => delete-inference-trained-model.asciidoc} (79%) rename docs/reference/ml/df-analytics/apis/{get-trained-model-stats.asciidoc => get-inference-trained-model-stats.asciidoc} (96%) rename docs/reference/ml/df-analytics/apis/{get-trained-model.asciidoc => get-inference-trained-model.asciidoc} (90%) diff --git a/docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc b/docs/reference/ml/df-analytics/apis/delete-inference-trained-model.asciidoc similarity index 79% rename from docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc rename to docs/reference/ml/df-analytics/apis/delete-inference-trained-model.asciidoc index 2e28c2960e20d..492bc3010fc55 100644 --- a/docs/reference/ml/df-analytics/apis/delete-trained-model.asciidoc +++ b/docs/reference/ml/df-analytics/apis/delete-inference-trained-model.asciidoc @@ -1,10 +1,10 @@ [role="xpack"] [testenv="basic"] [[delete-inference]] -=== Delete trained model API +=== Delete {infer} trained model API [subs="attributes"] ++++ -Delete trained model +Delete {infer} trained model ++++ Deletes an existing trained {infer} model that is currently not referenced by an @@ -34,6 +34,14 @@ information, see <> and <>. include::{docdir}/ml/ml-shared.asciidoc[tag=model-id] +[ml-delete-inference-response-codes]] +==== {api-response-codes-title} + +`409`:: + The code indicates that the trained {infer} model is referenced by an ingest + pipeline and cannot be deleted. + + [[ml-delete-inference-example]] ==== {api-examples-title} diff --git a/docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc b/docs/reference/ml/df-analytics/apis/get-inference-trained-model-stats.asciidoc similarity index 96% rename from docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc rename to docs/reference/ml/df-analytics/apis/get-inference-trained-model-stats.asciidoc index b0c0e2b4e44cb..a31dc071640bc 100644 --- a/docs/reference/ml/df-analytics/apis/get-trained-model-stats.asciidoc +++ b/docs/reference/ml/df-analytics/apis/get-inference-trained-model-stats.asciidoc @@ -1,10 +1,10 @@ [role="xpack"] [testenv="basic"] [[get-inference-stats]] -=== Get trained model statistics API +=== Get {infer} trained model statistics API [subs="attributes"] ++++ -Get trained model stats +Get {infer} trained model stats ++++ Retrieves usage information for trained {infer} models. diff --git a/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc b/docs/reference/ml/df-analytics/apis/get-inference-trained-model.asciidoc similarity index 90% rename from docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc rename to docs/reference/ml/df-analytics/apis/get-inference-trained-model.asciidoc index ae996c7d52ed5..8586962c835cc 100644 --- a/docs/reference/ml/df-analytics/apis/get-trained-model.asciidoc +++ b/docs/reference/ml/df-analytics/apis/get-inference-trained-model.asciidoc @@ -1,10 +1,10 @@ [role="xpack"] [testenv="basic"] [[get-inference]] -=== Get trained model API +=== Get {infer} trained model API [subs="attributes"] ++++ -Get trained model +Get {infer} trained model ++++ Retrieves configuration information for a trained {infer} model. @@ -75,6 +75,10 @@ include::{docdir}/ml/ml-shared.asciidoc[tag=size] [[ml-get-inference-response-codes]] ==== {api-response-codes-title} +`400`:: + If `include_model_definition` is `true`, this code indicates that more than + one models match the ID pattern. + `404` (Missing resources):: If `allow_no_match` is `false`, this code indicates that there are no resources that match the request or only partial matches for the request. diff --git a/docs/reference/ml/df-analytics/apis/index.asciidoc b/docs/reference/ml/df-analytics/apis/index.asciidoc index 511b11229f10f..cdad89f9bb4cd 100644 --- a/docs/reference/ml/df-analytics/apis/index.asciidoc +++ b/docs/reference/ml/df-analytics/apis/index.asciidoc @@ -13,11 +13,16 @@ You can use the following APIs to perform {ml} {dfanalytics} activities. * <> * <> * <> + +For the `analysis` object resources, check <>. + + +You can use the following APIs to perform {infer} operations. + * <> * <> * <> -For the `analysis` object resources, check <>. See also <>. @@ -25,6 +30,7 @@ See also <>. include::put-dfanalytics.asciidoc[] //DELETE include::delete-dfanalytics.asciidoc[] +include::delete-inference-trained-model.asciidoc[] //EVALUATE include::evaluate-dfanalytics.asciidoc[] //ESTIMATE_MEMORY_USAGE @@ -32,10 +38,8 @@ include::explain-dfanalytics.asciidoc[] //GET include::get-dfanalytics.asciidoc[] include::get-dfanalytics-stats.asciidoc[] +include::get-inference-trained-model.asciidoc[] +include::get-inference-trained-model-stats.asciidoc[] //SET/START/STOP include::start-dfanalytics.asciidoc[] include::stop-dfanalytics.asciidoc[] -//INFERENCE -include::get-trained-model.asciidoc[] -include::get-trained-model-stats.asciidoc[] -include::delete-trained-model.asciidoc[] From 4fb72c9262237281400751a873241ad189da55e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Istv=C3=A1n=20Zolt=C3=A1n=20Szab=C3=B3?= Date: Tue, 17 Dec 2019 10:38:14 +0100 Subject: [PATCH 10/10] [DOCS] Fixes section link. --- .../df-analytics/apis/delete-inference-trained-model.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/ml/df-analytics/apis/delete-inference-trained-model.asciidoc b/docs/reference/ml/df-analytics/apis/delete-inference-trained-model.asciidoc index 492bc3010fc55..f2fd703dd83da 100644 --- a/docs/reference/ml/df-analytics/apis/delete-inference-trained-model.asciidoc +++ b/docs/reference/ml/df-analytics/apis/delete-inference-trained-model.asciidoc @@ -34,7 +34,7 @@ information, see <> and <>. include::{docdir}/ml/ml-shared.asciidoc[tag=model-id] -[ml-delete-inference-response-codes]] +[[ml-delete-inference-response-codes]] ==== {api-response-codes-title} `409`::