mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-05 20:48:22 +00:00
c8374dc9f3
This adds a max_model_memory setting to forecast requests. This setting can take a string value that is formatted according to byte sizes (i.e. "50mb", "150mb"). The default value is `20mb`. There is a HARD limit at `500mb` which will throw an error if used. If the limit is larger than 40% the anomaly job's configured model limit, the forecast limit is reduced to be strictly lower than that value. This reduction is logged and audited. related native change: https://github.com/elastic/ml-cpp/pull/1238 closes: https://github.com/elastic/elasticsearch/issues/56420
55 lines
1.8 KiB
Plaintext
55 lines
1.8 KiB
Plaintext
--
|
|
:api: forecast-job
|
|
:request: ForecastJobRequest
|
|
:response: ForecastJobResponse
|
|
--
|
|
[role="xpack"]
|
|
[id="{upid}-{api}"]
|
|
=== Forecast Job API
|
|
|
|
The Forecast Job API provides the ability to forecast a {ml} job's behavior based
|
|
on historical data.
|
|
It accepts a +{request}+ object and responds
|
|
with a +{response}+ object.
|
|
|
|
[id="{upid}-{api}-request"]
|
|
==== Forecast Job Request
|
|
|
|
A +{request}+ object gets created with an existing non-null `jobId`.
|
|
All other fields are optional for the request.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-request]
|
|
--------------------------------------------------
|
|
<1> Constructing a new request referencing an existing `jobId`
|
|
|
|
==== Optional Arguments
|
|
|
|
The following arguments are optional.
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-request-options]
|
|
--------------------------------------------------
|
|
<1> Set when the forecast for the job should expire
|
|
<2> Set how far into the future should the forecast predict
|
|
<3> Set the maximum amount of memory the forecast is allowed to use.
|
|
Defaults to 20mb. Maximum is 500mb, minimum is 1mb. If set to
|
|
40% or more of the job's configured memory limit, it is
|
|
automatically reduced to below that number.
|
|
|
|
[id="{upid}-{api}-response"]
|
|
==== Forecast Job Response
|
|
|
|
A +{response}+ contains an acknowledgement and the forecast ID
|
|
|
|
["source","java",subs="attributes,callouts,macros"]
|
|
--------------------------------------------------
|
|
include-tagged::{doc-tests-file}[{api}-response]
|
|
--------------------------------------------------
|
|
<1> `isAcknowledged()` indicates if the forecast was successful
|
|
<2> `getForecastId()` provides the ID of the forecast that was created
|
|
|
|
include::../execution.asciidoc[]
|