This page describes how to tune, pause, resume, delete, and list recommendation models. For help with creating a new recommendation model, see Create recommendation models.
Tune a model
Vertex AI Search for retail uses the input data you provide to your model to adjust hyperparameters for training.
Tuning takes 2-4 days, during which the model continues to work as usual. For tuning cost details, see Pricing.
Set a model's tuning frequency
We recommend you periodically tune your model. This keeps model training optimal as data changes and customer behavior differs throughout the year. In addition, some internal major model upgrades can only be applied after the model has been tuned.
When creating the model, you can set it to automatically tune every three months, or choose to only tune it manually. Regardless of the setting you choose, the model automatically tunes one time after creation.
You can change the tuning status setting at any time. Changing this setting doesn't affect currently running tuning processes.
To edit a model's tuning status setting:
Console
Go to the Models page in the Search for Retail console.
Go to the Models pageYou can see the tuning status of every model under Tuning status.
Click a model name to view its details page.
Click Edit edit next to Tuning status.
From the drop-down list, select a setting:
- Every three months. Automatically tunes when the last tune was 90 days ago.
- Manual tune only. Tunes only when you manually tune.
Click Done done to save your setting.
curl
Make a Models.patch
request using the API. See the
Models.patch
API reference.
For details about all Models
fields, see the
Models
API reference.
curl -X PATCH \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ -d '{ "name": "projects/PROJECT_NUMBER/locations/global/catalogs/default_catalog/models/MODEL_ID", "PeriodicTuningState": "NEW_TUNING_STATE_VALUE" }' \ 'https://retail.googleapis.com/v2/projects/PROJECT_NUMBER/locations/global/catalogs/default_catalog/models/MODEL_ID?updateMask=PeriodicTuningState'
Manually tune a model
Manual tune triggers a one-time tune of your model. You might manually tune your model when there is a significant change in your catalog (such as size increase or change in catalog hierarchy) or events (such as backfilling historical events or a change in data distribution after promoting certain groups of items).
To manually tune a model:
Console
Go to the Models page in the Search for Retail console.
Go to the Models pageClick a model name to view its details page.
Click Manual Tune in the button bar.
Tuning takes 2-4 days, during which the model continues to work as usual.
curl
Make a Models.tune
request using the API. See the
Models.tune
API reference.
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ 'https://retail.googleapis.com/v2/projects/PROJECT_NUMBER/locations/global/catalogs/default_catalog/models/MODEL_ID:tune'
Pause and resume training for a model
If your model is active (not paused), the model is retrained at least once a week, but no more often than once a day. For consistent retraining, make sure that you upload user event data no more than 24 hours after the event occurs.
You can pause your model to stop retraining. You might want to do this if you have imported bad data or to stay under the limit of 10 active models per project. If you have fewer than 10 active models, you can restart a paused model at any time.
For training cost details, see Pricing.
You can start up to five model operations per minute. Limited model operations include creation, deletion, pause, and resume.
To pause or restart a model:
Console
Go to the Models page in the Search for Retail console.
Go to the Models pageYou can see the training status of every model under Training status.
To pause an active model (Training status of TRAINING), click Pause pause.
To start a paused model (Training status of PAUSED), click Resume play_arrow.
curl
To pause an active model, make a Models.pause
request using the
API. See the Models.pause
API reference.
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ 'https://retail.googleapis.com/v2/projects/PROJECT_NUMBER/locations/global/catalogs/default_catalog/models/MODEL_ID:pause'
To start a paused model, make a Models.resume
request using the
API.
curl -X POST \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ 'https://retail.googleapis.com/v2/projects/PROJECT_NUMBER/locations/global/catalogs/default_catalog/models/MODEL_ID:resume'
View model details
View a model's details in the console or using the Models.get
API method.
To see the serving configs that are associated with a specific model, use the console procedure below. All other model details are available in both the console and the API response.
Console
Go to the Models page in the Search for Retail console.
Go to the Models pageThe Models page lists all your models and their training and query statuses.
Click a model name to view its Details page.
curl
To get a single model's information, make a Models.get
request using the
API. See the Models.get
API reference.
curl -X GET \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ 'https://retail.googleapis.com/v2/projects/PROJECT_NUMBER/locations/global/catalogs/default_catalog/models/MODEL_ID'
List your models
View a list of your models in the console or using the Models.list
API method.
Console
Go to the Models page in the Search for Retail console.
Go to the Models pageThe Models page lists all your models and their training and query statuses.
curl
To list all models and their details inline, make a Models.list
request
using the API. See the Models.list
API
reference.
Optionally, you can use the parameter pageSize
to set a maximum number of
results to return. If more results are available, the list
response
includes a page token. You can pass a page token in the pageToken
parameter of a list
request to retrieve the next page of results. The
example below uses both parameters.
curl -X GET \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ 'https://retail.googleapis.com/v2/projects/PROJECT_NUMBER/locations/global/catalogs/default_catalog/models?pageSize=PAGE_SIZE&pageToken=PAGE_TOKEN'
Delete a model
You can start up to five model operations per minute. Limited model operations include creation, deletion, pause, and resume.
Delete a model in the console or using the Models.delete
API method.
Console
Go to the Models page in the Search for Retail console.
Go to the Models pageClick the name of the model you want to delete to open its details page.
Click Deletedelete in the button bar.
Reenter the model name and click Confirm.
curl
Make a Models.delete
request using the API. See the
Models.delete
API reference.
For details about all Models
fields, see the
Models
API reference.
curl -X DELETE \ -H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \ -H "Content-Type: application/json; charset=utf-8" \ 'https://retail.googleapis.com/v2/projects/PROJECT_NUMBER/locations/global/catalogs/default_catalog/models/MODEL_ID'