[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[],[],null,["# Manage models\n\nThis page describes how to tune, pause, resume, delete, and list\nrecommendation models. For help with creating a new recommendation model, see\n[Create recommendation models](/retail/docs/create-models).\n| **Note:** Model management is only available for recommendations.\n\nTune a model\n------------\n\nVertex AI Search for commerce uses the input data you provide to your model to\nadjust hyperparameters for training.\n\n\nTuning takes 2-4 days, during which the model continues to work as usual.\nFor tuning cost details, see [Pricing](/retail/docs/pricing).\n\n### Set a model's tuning frequency\n\nWe recommend you periodically tune your model. This keeps model training optimal\nas data changes and customer behavior differs throughout the year. In addition,\nsome internal major model upgrades can only be applied after the model has\nbeen tuned.\n\nWhen creating the model, you can set it to automatically tune every three\nmonths, or choose to only tune it manually. Regardless of the setting you\nchoose, the model automatically tunes one time after creation.\n\nYou can change the tuning status setting at any time. Changing this setting\ndoesn't affect currently running tuning processes.\n\nTo edit a model's tuning status setting: \n\n### Console\n\n1.\n Go to the **Models** page in the Search for commerce console. \n\n\n [Go to the Models page](https://console.cloud.google.com/ai/retail/catalogs/default_catalog/models/)\n\n You can see the tuning status of every model under **Tuning status**.\n2. Click a model name to view its details page.\n\n3. Click **Edit** *edit* next to **Tuning\n status**.\n\n4. From the drop-down list, select a setting:\n\n - **Every three months**. Automatically tunes when the last tune was 90 days ago.\n - **Manual tune only** . Tunes only when you [manually tune](#manual).\n5. Click **Done** *done* to save your setting.\n\n### curl\n\nMake a `Models.patch` request using the API. See the\n[`Models.patch`](/retail/docs/reference/rest/v2/projects.locations.catalogs.models/patch) API reference.\n\nFor details about all `Models` fields, see the\n[`Models` API reference](/retail/docs/reference/rest/v2/projects.locations.catalogs.models). \n\n```bash\ncurl -X PATCH \\\n-H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n-H \"Content-Type: application/json; charset=utf-8\" \\\n-d '{\n \"name\": \"projects/\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e/locations/global/catalogs/default_catalog/models/\u003cvar translate=\"no\"\u003eMODEL_ID\u003c/var\u003e\",\n \"PeriodicTuningState\": \"\u003cvar translate=\"no\"\u003eNEW_TUNING_STATE_VALUE\u003c/var\u003e\"\n}' \\\n'https://retail.googleapis.com/v2/projects/\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e/locations/global/catalogs/default_catalog/models/\u003cvar translate=\"no\"\u003eMODEL_ID\u003c/var\u003e?updateMask=PeriodicTuningState'\n```\n\n### Manually tune a model\n\nManual tune triggers a one-time tune of your model. You might manually tune your\nmodel when there is a significant change in your catalog (such as size increase\nor change in catalog hierarchy) or events (such as backfilling historical events\nor a change in data distribution after promoting certain groups of items).\n\nTo manually tune a model: \n\n### Console\n\n1.\n Go to the **Models** page in the Search for commerce console. \n\n\n [Go to the Models page](https://console.cloud.google.com/ai/retail/catalogs/default_catalog/models/)\n\n2. Click a model name to view its details page.\n\n3. Click **Manual Tune** in the button bar.\n\n\n Tuning takes 2-4 days, during which the model continues to work as usual.\n\n### curl\n\nMake a `Models.tune` request using the API. See the\n[`Models.tune`](/retail/docs/reference/rest/v2/projects.locations.catalogs.models/patch) API reference. \n\n```bash\ncurl -X POST \\\n-H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n-H \"Content-Type: application/json; charset=utf-8\" \\\n'https://retail.googleapis.com/v2/projects/\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e/locations/global/catalogs/default_catalog/models/\u003cvar translate=\"no\"\u003eMODEL_ID\u003c/var\u003e:tune'\n```\n\nPause and resume training for a model\n-------------------------------------\n\nIf your model is active (not paused), the model is retrained at least once a\nweek, but no more often than once a day. For consistent retraining, make sure\nthat you upload user event data no more than 24 hours after the event occurs.\n\nYou can pause your model to stop retraining. You might want to do this if you\nhave imported bad data or to stay under the limit of 10 active models per\nproject. If you have fewer than 10 active models,\nyou can restart a paused model at any time.\n\nFor training cost details, see [Pricing](/retail/docs/pricing).\n\n\nYou can start up to five model operations per minute. Limited model operations\ninclude creation, deletion, pause, and resume.\n\nTo pause or restart a model: \n\n### Console\n\n1.\n Go to the **Models** page in the Search for commerce console. \n\n\n [Go to the Models page](https://console.cloud.google.com/ai/retail/catalogs/default_catalog/models/)\n\n You can see the training status of every model under **Training status**.\n2. To pause an active model (**Training status** of **TRAINING** ), click\n **Pause** *pause*.\n\n3. To start a paused model (**Training status** of **PAUSED** ), click\n **Resume** *play_arrow*.\n\n### curl\n\nTo pause an active model, make a `Models.pause` request using the\nAPI. See the [`Models.pause`](/retail/docs/reference/rest/v2/projects.locations.catalogs.models/delete) API reference. \n\n```bash\ncurl -X POST \\\n-H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n-H \"Content-Type: application/json; charset=utf-8\" \\\n'https://retail.googleapis.com/v2/projects/\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e/locations/global/catalogs/default_catalog/models/\u003cvar translate=\"no\"\u003eMODEL_ID\u003c/var\u003e:pause'\n```\n\nTo start a paused model, make a `Models.resume` request using the\nAPI. \n\n```bash\ncurl -X POST \\\n-H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n-H \"Content-Type: application/json; charset=utf-8\" \\\n'https://retail.googleapis.com/v2/projects/\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e/locations/global/catalogs/default_catalog/models/\u003cvar translate=\"no\"\u003eMODEL_ID\u003c/var\u003e:resume'\n```\n\nView model details\n------------------\n\nView a model's details in the console or using the `Models.get` API method.\n\nTo see the serving configs that are associated with a specific model, use the\nconsole procedure below. All other model details are available in both the\nconsole and the API response. \n\n### Console\n\n1.\n Go to the **Models** page in the Search for commerce console. \n\n\n [Go to the Models page](https://console.cloud.google.com/ai/retail/catalogs/default_catalog/models/)\n\n2. The **Models** page lists all your models and their training and query\n statuses.\n\n3. Click a model name to view its **Details** page.\n\n### curl\n\nTo get a single model's information, make a `Models.get` request using the\nAPI. See the [`Models.get`](/retail/docs/reference/rest/v2/projects.locations.catalogs.models/get) API reference. \n\n```bash\ncurl -X GET \\\n-H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n-H \"Content-Type: application/json; charset=utf-8\" \\\n'https://retail.googleapis.com/v2/projects/\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e/locations/global/catalogs/default_catalog/models/\u003cvar translate=\"no\"\u003eMODEL_ID\u003c/var\u003e'\n```\n\nList your models\n----------------\n\nView a list of your models in the console or using the `Models.list` API method. \n\n### Console\n\n1.\n Go to the **Models** page in the Search for commerce console. \n\n\n [Go to the Models page](https://console.cloud.google.com/ai/retail/catalogs/default_catalog/models/)\n\n2. The **Models** page lists all your models and their training and query\n statuses.\n\n### curl\n\nTo list all models and their details inline, make a `Models.list` request\nusing the API. See the [`Models.list`](/retail/docs/reference/rest/v2/projects.locations.catalogs.models/list) API\nreference.\n\nOptionally, you can use the parameter `pageSize` to set a maximum number of\nresults to return. If more results are available, the `list` response\nincludes a page token. You can pass a page token in the `pageToken`\nparameter of a `list` request to retrieve the next page of results. The\nexample below uses both parameters. \n\n```bash\ncurl -X GET \\\n-H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n-H \"Content-Type: application/json; charset=utf-8\" \\\n'https://retail.googleapis.com/v2/projects/\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e/locations/global/catalogs/default_catalog/models?pageSize=\u003cvar translate=\"no\"\u003ePAGE_SIZE\u003c/var\u003e&pageToken=\u003cvar translate=\"no\"\u003ePAGE_TOKEN\u003c/var\u003e'\n```\n\nDelete a model\n--------------\n\n\nYou can start up to five model operations per minute. Limited model operations\ninclude creation, deletion, pause, and resume.\n\nDelete a model in the console or using the `Models.delete` API method. \n\n### Console\n\n1.\n Go to the **Models** page in the Search for commerce console. \n\n\n [Go to the Models page](https://console.cloud.google.com/ai/retail/catalogs/default_catalog/models/)\n\n2. Click the name of the model you want to delete to open its details page.\n\n3. Click **Delete** *delete* in the button bar.\n\n4. Reenter the model name and click **Confirm**.\n\n### curl\n\nMake a `Models.delete` request using the API. See the\n[`Models.delete`](/retail/docs/reference/rest/v2/projects.locations.catalogs.models/delete) API reference.\n\nFor details about all `Models` fields, see the\n[`Models` API reference](/retail/docs/reference/rest/v2/projects.locations.catalogs.models). \n\n```bash\ncurl -X DELETE \\\n-H \"Authorization: Bearer $(gcloud auth application-default print-access-token)\" \\\n-H \"Content-Type: application/json; charset=utf-8\" \\\n'https://retail.googleapis.com/v2/projects/\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e/locations/global/catalogs/default_catalog/models/\u003cvar translate=\"no\"\u003eMODEL_ID\u003c/var\u003e'\n```"]]