Skip to content

Commit 03d9537

Browse files
authored
[DOCS] Adds cat trained model API documentation (#52824)
1 parent 99120a7 commit 03d9537

File tree

3 files changed

+129
-1
lines changed

3 files changed

+129
-1
lines changed

docs/reference/cat.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ include::cat/tasks.asciidoc[]
257257

258258
include::cat/thread_pool.asciidoc[]
259259

260+
include::cat/trainedmodel.asciidoc[]
261+
260262
include::cat/shards.asciidoc[]
261263

262264
include::cat/segments.asciidoc[]
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
[role="xpack"]
2+
[testenv="platinum"]
3+
[[cat-trained-model]]
4+
=== cat trained model API
5+
++++
6+
<titleabbrev>cat trained model</titleabbrev>
7+
++++
8+
9+
Returns configuration and usage information about {infer} trained models.
10+
11+
12+
[[cat-trained-model-request]]
13+
==== {api-request-title}
14+
15+
`GET /_cat/ml/trained_models`
16+
17+
18+
[[cat-trained-model-prereqs]]
19+
==== {api-prereq-title}
20+
21+
If the {es} {security-features} are enabled, you must have the following
22+
privileges:
23+
24+
* cluster: `monitor_ml`
25+
26+
For more information, see <<security-privileges>> and
27+
{ml-docs}/setup.html[Set up {ml-features}].
28+
29+
30+
////
31+
[[cat-trained-model-desc]]
32+
==== {api-description-title}
33+
////
34+
35+
36+
[[cat-trained-model-query-params]]
37+
==== {api-query-parms-title}
38+
39+
include::{docdir}/rest-api/common-parms.asciidoc[tag=bytes]
40+
41+
include::{docdir}/rest-api/common-parms.asciidoc[tag=http-format]
42+
43+
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-h]
44+
+
45+
If you do not specify which columns to include, the API returns the default
46+
columns. If you explicitly specify one or more columns, it returns only the
47+
specified columns.
48+
+
49+
Valid columns are:
50+
51+
`create_time`, `ct`:::
52+
The time when the trained model was created.
53+
54+
`created_by`, `c`, `createdBy`:::
55+
Information on the creator of the trained model.
56+
57+
`data_frame_analytics_id`, `df`, `dataFrameAnalytics`:::
58+
Identifier for the {dfanalytics-job} that created the model. Only displayed if
59+
it is still available.
60+
61+
`description`, `d`:::
62+
The description of the trained model.
63+
64+
`heap_size`, `hs`, `modelHeapSize`:::
65+
(Default)
66+
The estimated heap size to keep the trained model in memory.
67+
68+
`id`:::
69+
(Default)
70+
Idetifier for the trained model.
71+
72+
`ingest.count`, `ic`, `ingestCount`:::
73+
The total number of documents that are processed by the model.
74+
75+
`ingest.current`, `icurr`, `ingestCurrent`:::
76+
The total number of document that are currently being handled by the trained
77+
model.
78+
79+
`ingest.failed`, `if`, `ingestFailed`:::
80+
The total number of failed ingest attempts with the trained model.
81+
82+
`ingest.pipelines`, `ip`, `ingestPipelines`:::
83+
(Default)
84+
The total number of ingest pipelines that are referencing the trained model.
85+
86+
`ingest.time`, `it`, `ingestTime`:::
87+
The total time that is spent processing documents with the trained model.
88+
89+
`license`, `l`:::
90+
The license level of the trained model.
91+
92+
`operations`, `o`, `modelOperations`:::
93+
(Default)
94+
The estimated number of operations to use the trained model. This number helps
95+
measuring the computational complexity of the model.
96+
97+
`version`, `v`:::
98+
The {es} version number in which the trained model was created.
99+
100+
include::{docdir}/rest-api/common-parms.asciidoc[tag=help]
101+
102+
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-s]
103+
104+
include::{docdir}/rest-api/common-parms.asciidoc[tag=time]
105+
106+
include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-v]
107+
108+
109+
[[cat-trained-model-example]]
110+
==== {api-examples-title}
111+
112+
[source,console]
113+
--------------------------------------------------
114+
GET _cat/ml/trained_models?h=c,o,l,ct,v&v
115+
--------------------------------------------------
116+
// TEST[skip:kibana sample data]
117+
118+
119+
[source,console-result]
120+
----
121+
id created_by operations license create_time version
122+
ddddd-1580216177138 _xpack 196 PLATINUM 2020-01-28T12:56:17.138Z 8.0.0
123+
flight-regress-1580215685537 _xpack 102 PLATINUM 2020-01-28T12:48:05.537Z 8.0.0
124+
lang_ident_model_1 _xpack 39629 BASIC 2019-12-05T12:28:34.594Z 7.6.0
125+
----
126+
// TESTRESPONSE[skip:kibana sample data]

x-pack/plugin/src/test/resources/rest-api-spec/api/cat.ml_trained_models.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"cat.ml_trained_models":{
33
"documentation":{
4-
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/get-inference-stats.html"
4+
"url":"https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-trained-model.html"
55
},
66
"stability":"stable",
77
"url":{

0 commit comments

Comments
 (0)