- Resource: Model
- PageOptimizationConfig
- Panel
- Candidate
- Restriction
- TrainingState
- ServingState
- PeriodicTuningState
- DataState
- ServingConfigList
- ModelFeaturesConfig
- FrequentlyBoughtTogetherFeaturesConfig
- ContextProductsType
- Methods
Resource: Model
Metadata that describes the training and serving parameters of a Model
. A Model
can be associated with a ServingConfig
and then queried through the Predict API.
JSON representation |
---|
{ "name": string, "displayName": string, "trainingState": enum ( |
Fields | |
---|---|
name |
Required. The fully qualified resource name of the model. Format: |
displayName |
Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters. |
trainingState |
Optional. The training state that the model is in (e.g. Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for |
servingState |
Output only. The serving state of the model: |
createTime |
Output only. Timestamp the Recommendation Model was created at. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
updateTime |
Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
type |
Required. The type of model e.g. Currently supported values: This field together with |
optimizationObjective |
Optional. The optimization objective e.g. Currently supported values: If not specified, we choose default based on model type. Default depends on type of recommendation:
This field together with |
periodicTuningState |
Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the |
lastTuneTime |
Output only. The timestamp when the latest successful tune finished. A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
tuningOperation |
Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on. |
dataState |
Output only. The state of data requirements for this model: Recommendation model cannot be trained if the data is in |
filteringOption |
Optional. If |
servingConfigLists[] |
Output only. The list of valid serving configs associated with the PageOptimizationConfig. |
modelFeaturesConfig |
Optional. Additional model features config. |
Union field training_config . Training configuration specific to a Model.type - currently, only for page optimization. training_config can be only one of the following: |
|
pageOptimizationConfig |
Optional. The page optimization config. |
PageOptimizationConfig
The PageOptimizationConfig for model training.
This determines how many panels to optimize for, and which serving configs to consider for each panel. The purpose of this model is to optimize which ServingConfig
to show on which panels in way that optimizes the visitors shopping journey.
JSON representation |
---|
{ "pageOptimizationEventType": string, "panels": [ { object ( |
Fields | |
---|---|
pageOptimizationEventType |
Required. The type of Each page has an associated event type - this will be the corresponding event type for the page that the page optimization model is used on. Supported types:
|
panels[] |
Required. A list of panel configurations. Limit = 5. |
restriction |
Optional. How to restrict results across panels e.g. can the same If unspecified, default to |
Panel
An individual panel with a list of ServingConfigs
to consider for it.
JSON representation |
---|
{ "displayName": string, "candidates": [ { object ( |
Fields | |
---|---|
displayName |
Optional. The name to display for the panel. |
candidates[] |
Required. The candidates to consider on the panel. |
defaultCandidate |
Required. The default candidate. If the model fails at serving time, we fall back to the default. |
Candidate
A candidate to consider for a given panel. Currently only ServingConfig
are valid candidates.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
servingConfigId |
This has to be a valid |
Restriction
Restrictions of expected returned results.
Enums | |
---|---|
RESTRICTION_UNSPECIFIED |
Unspecified value for restriction. |
NO_RESTRICTION |
Allow any Example:
|
UNIQUE_SERVING_CONFIG_RESTRICTION |
Do not allow the same Example:
|
UNIQUE_MODEL_RESTRICTION |
Do not allow multiple Example:
|
UNIQUE_MODEL_TYPE_RESTRICTION |
Do not allow multiple Example:
|
TrainingState
The training state of the model.
Enums | |
---|---|
TRAINING_STATE_UNSPECIFIED |
Unspecified training state. |
PAUSED |
The model training is paused. |
TRAINING |
The model is training. |
ServingState
The serving state of the model.
Enums | |
---|---|
SERVING_STATE_UNSPECIFIED |
Unspecified serving state. |
INACTIVE |
The model is not serving. |
ACTIVE |
The model is serving and can be queried. |
TUNED |
The model is trained on tuned hyperparameters and can be queried. |
PeriodicTuningState
Describes whether periodic tuning is enabled for this model or not. Periodic tuning is scheduled at most every three months. You can start a tuning process manually by using the models.tune
method, which starts a tuning process immediately and resets the quarterly schedule. Enabling or disabling periodic tuning does not affect any current tuning processes.
Enums | |
---|---|
PERIODIC_TUNING_STATE_UNSPECIFIED |
Unspecified default value, should never be explicitly set. |
PERIODIC_TUNING_DISABLED |
The model has periodic tuning disabled. Tuning can be reenabled by calling the EnableModelPeriodicTuning method or by calling the models.tune method. |
ALL_TUNING_DISABLED |
The model cannot be tuned with periodic tuning OR the models.tune method. Hide the options in customer UI and reject any requests through the backend self serve API. |
PERIODIC_TUNING_ENABLED |
The model has periodic tuning enabled. Tuning can be disabled by calling the DisableModelPeriodicTuning method. |
DataState
Describes whether this model have sufficient training data to be continuously trained.
Enums | |
---|---|
DATA_STATE_UNSPECIFIED |
Unspecified default value, should never be explicitly set. |
DATA_OK |
The model has sufficient training data. |
DATA_ERROR |
The model does not have sufficient training data. Error messages can be queried via Stackdriver. |
ServingConfigList
Represents an ordered combination of valid serving configs, which can be used for PAGE_OPTIMIZATION
recommendations.
JSON representation |
---|
{ "servingConfigIds": [ string ] } |
Fields | |
---|---|
servingConfigIds[] |
Optional. A set of valid serving configs that may be used for |
ModelFeaturesConfig
Additional model features config.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
frequentlyBoughtTogetherConfig |
Additional configs for frequently-bought-together models. |
FrequentlyBoughtTogetherFeaturesConfig
Additional configs for the frequently-bought-together model type.
JSON representation |
---|
{
"contextProductsType": enum ( |
Fields | |
---|---|
contextProductsType |
Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the |
ContextProductsType
Use single or multiple context products for recommendations.
Enums | |
---|---|
CONTEXT_PRODUCTS_TYPE_UNSPECIFIED |
Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS . |
SINGLE_CONTEXT_PRODUCT |
Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details. |
MULTIPLE_CONTEXT_PRODUCTS |
Use one or multiple products as context for the recommendation. Typically used on shopping cart pages. |
Methods |
|
---|---|
|
Creates a new model. |
|
Deletes an existing model. |
|
Gets a model. |
|
Lists all the models linked to this event store. |
|
Update of model metadata. |
|
Pauses the training of an existing model. |
|
Resumes the training of an existing model. |
|
Tunes an existing model. |