mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 23:27:25 -04:00
[ML][Inference] PUT API (#50852)
This adds the `PUT` API for creating trained models that support our format. This includes * HLRC change for the API * API creation * Validations of model format and call
This commit is contained in:
parent
e7cd44fc80
commit
4cecb7a5be
37 changed files with 1648 additions and 422 deletions
53
docs/java-rest/high-level/ml/put-trained-model.asciidoc
Normal file
53
docs/java-rest/high-level/ml/put-trained-model.asciidoc
Normal file
|
@ -0,0 +1,53 @@
|
|||
--
|
||||
:api: put-trained-model
|
||||
:request: PutTrainedModelRequest
|
||||
:response: PutTrainedModelResponse
|
||||
--
|
||||
[role="xpack"]
|
||||
[id="{upid}-{api}"]
|
||||
=== Put Trained Model API
|
||||
|
||||
Creates a new trained model for inference.
|
||||
The API accepts a +{request}+ object as a request and returns a +{response}+.
|
||||
|
||||
[id="{upid}-{api}-request"]
|
||||
==== Put Trained Model request
|
||||
|
||||
A +{request}+ requires the following argument:
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-request]
|
||||
--------------------------------------------------
|
||||
<1> The configuration of the {infer} Trained Model to create
|
||||
|
||||
[id="{upid}-{api}-config"]
|
||||
==== Trained Model configuration
|
||||
|
||||
The `TrainedModelConfig` object contains all the details about the trained model
|
||||
configuration and contains the following arguments:
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-config]
|
||||
--------------------------------------------------
|
||||
<1> The {infer} definition for the model
|
||||
<2> Optionally, if the {infer} definition is large, you may choose to compress it for transport.
|
||||
Do not supply both the compressed and uncompressed definitions.
|
||||
<3> The unique model id
|
||||
<4> The input field names for the model definition
|
||||
<5> Optionally, a human-readable description
|
||||
<6> Optionally, an object map contain metadata about the model
|
||||
<7> Optionally, an array of tags to organize the model
|
||||
|
||||
include::../execution.asciidoc[]
|
||||
|
||||
[id="{upid}-{api}-response"]
|
||||
==== Response
|
||||
|
||||
The returned +{response}+ contains the newly created trained model.
|
||||
|
||||
["source","java",subs="attributes,callouts,macros"]
|
||||
--------------------------------------------------
|
||||
include-tagged::{doc-tests-file}[{api}-response]
|
||||
--------------------------------------------------
|
|
@ -304,6 +304,7 @@ The Java High Level REST Client supports the following Machine Learning APIs:
|
|||
* <<{upid}-evaluate-data-frame>>
|
||||
* <<{upid}-explain-data-frame-analytics>>
|
||||
* <<{upid}-get-trained-models>>
|
||||
* <<{upid}-put-trained-model>>
|
||||
* <<{upid}-get-trained-models-stats>>
|
||||
* <<{upid}-delete-trained-model>>
|
||||
* <<{upid}-put-filter>>
|
||||
|
@ -359,6 +360,7 @@ include::ml/stop-data-frame-analytics.asciidoc[]
|
|||
include::ml/evaluate-data-frame.asciidoc[]
|
||||
include::ml/explain-data-frame-analytics.asciidoc[]
|
||||
include::ml/get-trained-models.asciidoc[]
|
||||
include::ml/put-trained-model.asciidoc[]
|
||||
include::ml/get-trained-models-stats.asciidoc[]
|
||||
include::ml/delete-trained-model.asciidoc[]
|
||||
include::ml/put-filter.asciidoc[]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue