- Resource: Model
- TrainingState
- ServingState
- PeriodicTuningState
- DataState
- RecommendationsFilteringOption
- 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. |
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. |
RecommendationsFilteringOption
If filtering for recommendations is enabled.
Enums | |
---|---|
RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED |
Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED . |
RECOMMENDATIONS_FILTERING_DISABLED |
Recommendation filtering is disabled. |
RECOMMENDATIONS_FILTERING_ENABLED |
Recommendation filtering is enabled. |
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. |