[ML] Add new include flag to GET inference/<model_id> API for model training metadata (#61922)

Adds new flag include to the get trained models API
The flag initially has two valid values: definition, total_feature_importance.
Consequently, the old include_model_definition flag is now deprecated.
When total_feature_importance is included, the total_feature_importance field is included in the model metadata object.
Including definition is the same as previously setting include_model_definition=true.
This commit is contained in:
Benjamin Trent 2020-09-18 07:11:38 -04:00 committed by GitHub
parent b0c2b92458
commit fdb7b6d3b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 820 additions and 163 deletions

View file

@ -22,26 +22,28 @@ IDs, or the special wildcard `_all` to get all trained models.
--------------------------------------------------
include-tagged::{doc-tests-file}[{api}-request]
--------------------------------------------------
<1> Constructing a new GET request referencing an existing Trained Model
<1> Constructing a new GET request referencing an existing trained model
<2> Set the paging parameters
<3> Indicate if the complete model definition should be included
<4> Should the definition be fully decompressed on GET
<5> Allow empty response if no Trained Models match the provided ID patterns.
If false, an error will be thrown if no Trained Models match the
<4> Indicate if the total feature importance for the features used in training
should be included in the model `metadata` field.
<5> Should the definition be fully decompressed on GET
<6> Allow empty response if no trained models match the provided ID patterns.
If false, an error will be thrown if no trained models match the
ID patterns.
<6> An optional list of tags used to narrow the model search. A Trained Model
<7> An optional list of tags used to narrow the model search. A trained model
can have many tags or none. The trained models in the response will
contain all the provided tags.
<7> Optional boolean value indicating if certain fields should be removed on
retrieval. This is useful for getting the trained model in a format that
can then be put into another cluster.
<8> Optional boolean value for requesting the trained model in a format that can
then be put into another cluster. Certain fields that can only be set when
the model is imported are removed.
include::../execution.asciidoc[]
[id="{upid}-{api}-response"]
==== Response
The returned +{response}+ contains the requested Trained Model.
The returned +{response}+ contains the requested trained model.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------