Class PageOptimizationConfig (2.5.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version latestkeyboard_arrow_down
PageOptimizationConfig ( mapping = None , * , ignore_unknown_fields = False , ** kwargs )
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.
Attributes
Name
Description
page_optimization_event_type
str
Required. The type of
UserEvent this page
optimization is shown for.
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:
- add-to-cart
: Products being added to cart.
- detail-page-view
: Products detail page viewed.
- home-page-view
: Homepage viewed
- category-page-view
: Homepage viewed
- shopping-cart-page-view
: User viewing a shopping
cart.
home-page-view
only allows models with type
recommended-for-you
. All other
page_optimization_event_type allow all
Model.types .
panels
MutableSequence[google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig.Panel ]
Required. A list of panel configurations.
Limit = 5.
restriction
google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig.Restriction
Optional. How to restrict results across panels e.g. can the
same
ServingConfig
be shown on multiple panels at once.
If unspecified, default to UNIQUE_MODEL_RESTRICTION
.
Classes
Candidate
Candidate ( mapping = None , * , ignore_unknown_fields = False , ** kwargs )
Panel
Panel ( mapping = None , * , ignore_unknown_fields = False , ** kwargs )
An individual panel with a list of
ServingConfigs to
consider for it.
Restriction
Restrictions of expected returned results.
Example:
`Panel1 candidates`: pdp_ctr, pdp_cvr,
home_page_ctr_no_diversity
`Panel2 candidates`: home_page_ctr_no_diversity,
home_page_ctr_diversity, pdp_cvr_no_diversity
`Restriction` = NO_RESTRICTION
`Valid combinations`:
- (pdp_ctr, home_page_ctr_no_diversity)
- (pdp_ctr, home_page_ctr_diversity)
- (pdp_ctr, pdp_cvr_no_diversity)
- (pdp_cvr, home_page_ctr_no_diversity)
- (pdp_cvr, home_page_ctr_diversity)
- (pdp_cvr, pdp_cvr_no_diversity)
- (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
- (home_page_ctr_no_diversity, home_page_ctr_diversity)
- (home_page_ctr_no_diversity, pdp_cvr_no_diversity)
`Invalid combinations`: []
UNIQUE_SERVING_CONFIG_RESTRICTION (2):
Do not allow the same
<xref uid="google.cloud.retail.v2alpha.ServingConfig.name">ServingConfig.name</xref>
to be shown on multiple panels.
Example:
`Panel1 candidates`: pdp_ctr, pdp_cvr,
home_page_ctr_no_diversity
`Panel2 candidates`: home_page_ctr_no_diversity,
home_page_ctr_diversity_low, pdp_cvr_no_diversity
`Restriction` = `UNIQUE_SERVING_CONFIG_RESTRICTION`
`Valid combinations`:
- (pdp_ctr, home_page_ctr_no_diversity)
- (pdp_ctr, home_page_ctr_diversity_low)
- (pdp_ctr, pdp_cvr_no_diversity)
- (pdp_ctr, pdp_cvr_no_diversity)
- (pdp_cvr, home_page_ctr_no_diversity)
- (pdp_cvr, home_page_ctr_diversity_low)
- (pdp_cvr, pdp_cvr_no_diversity)
- (home_page_ctr_no_diversity, home_page_ctr_diversity_low)
- (home_page_ctr_no_diversity, pdp_cvr_no_diversity)
`Invalid combinations`:
- (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
UNIQUE_MODEL_RESTRICTION (3):
Do not allow multiple
<xref uid="google.cloud.retail.v2alpha.ServingConfig">ServingConfigs</xref>
with same
<xref uid="google.cloud.retail.v2alpha.Model.name">Model.name</xref> to be
show on on different panels.
Example:
`Panel1 candidates`: pdp_ctr, pdp_cvr,
home_page_ctr_no_diversity
`Panel2 candidates`: home_page_ctr_no_diversity,
home_page_ctr_diversity_low, pdp_cvr_no_diversity
`Restriction` = `UNIQUE_MODEL_RESTRICTION`
`Valid combinations`:
- (pdp_ctr, home_page_ctr_no_diversity)
- (pdp_ctr, home_page_ctr_diversity)
- (pdp_ctr, pdp_cvr_no_diversity)
- (pdp_ctr, pdp_cvr_no_diversity)
- (pdp_cvr, home_page_ctr_no_diversity)
- (pdp_cvr, home_page_ctr_diversity_low)
- (home_page_ctr_no_diversity, pdp_cvr_no_diversity)
`Invalid combinations`:
- (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
- (pdp_cvr, pdp_cvr_no_diversity)
UNIQUE_MODEL_TYPE_RESTRICTION (4):
Do not allow multiple
<xref uid="google.cloud.retail.v2alpha.ServingConfig">ServingConfigs</xref>
with same
<xref uid="google.cloud.retail.v2alpha.Model.type">Model.type</xref> to be
shown on different panels.
Example:
`Panel1 candidates`: pdp_ctr, pdp_cvr,
home_page_ctr_no_diversity
`Panel2 candidates`: home_page_ctr_no_diversity,
home_page_ctr_diversity_low, pdp_cvr_no_diversity
`Restriction` = `UNIQUE_MODEL_RESTRICTION`
`Valid combinations`:
- (pdp_ctr, home_page_ctr_no_diversity)
- (pdp_ctr, home_page_ctr_diversity)
- (pdp_cvr, home_page_ctr_no_diversity)
- (pdp_cvr, home_page_ctr_diversity_low)
- (home_page_ctr_no_diversity, pdp_cvr_no_diversity)
`Invalid combinations`:
- (pdp_ctr, pdp_cvr_no_diversity)
- (pdp_ctr, pdp_cvr_no_diversity)
- (pdp_cvr, pdp_cvr_no_diversity)
- (home_page_ctr_no_diversity, home_page_ctr_no_diversity)
- (home_page_ctr_no_diversity, home_page_ctr_diversity)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class PageOptimizationConfig (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/python/docs/reference/retail/latest/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [2.4.0](/python/docs/reference/retail/2.4.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [2.3.0](/python/docs/reference/retail/2.3.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [2.2.0](/python/docs/reference/retail/2.2.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [2.1.0](/python/docs/reference/retail/2.1.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [2.0.0](/python/docs/reference/retail/2.0.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.25.0](/python/docs/reference/retail/1.25.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.24.0](/python/docs/reference/retail/1.24.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.23.1](/python/docs/reference/retail/1.23.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.22.0](/python/docs/reference/retail/1.22.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.21.2](/python/docs/reference/retail/1.21.2/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.20.1](/python/docs/reference/retail/1.20.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.19.1](/python/docs/reference/retail/1.19.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.18.0](/python/docs/reference/retail/1.18.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.17.0](/python/docs/reference/retail/1.17.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.16.3](/python/docs/reference/retail/1.16.3/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.15.1](/python/docs/reference/retail/1.15.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.14.1](/python/docs/reference/retail/1.14.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.13.0](/python/docs/reference/retail/1.13.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.12.0](/python/docs/reference/retail/1.12.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.11.0](/python/docs/reference/retail/1.11.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.10.2](/python/docs/reference/retail/1.10.2/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.9.0](/python/docs/reference/retail/1.9.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.8.1](/python/docs/reference/retail/1.8.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.7.0](/python/docs/reference/retail/1.7.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.6.1](/python/docs/reference/retail/1.6.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.5.0](/python/docs/reference/retail/1.5.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.4.1](/python/docs/reference/retail/1.4.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.3.0](/python/docs/reference/retail/1.3.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.2.1](/python/docs/reference/retail/1.2.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.1.0](/python/docs/reference/retail/1.1.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [1.0.2](/python/docs/reference/retail/1.0.2/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [0.4.2](/python/docs/reference/retail/0.4.2/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [0.3.1](/python/docs/reference/retail/0.3.1/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [0.2.0](/python/docs/reference/retail/0.2.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig)\n- [0.1.0](/python/docs/reference/retail/0.1.0/google.cloud.retail_v2alpha.types.Model.PageOptimizationConfig) \n\n PageOptimizationConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nThe PageOptimizationConfig for model training.\n\nThis determines how many panels to optimize for, and which serving\nconfigs to consider for each panel. The purpose of this model is to\noptimize which\nServingConfig to show\non which panels in way that optimizes the visitors shopping journey.\n\nClasses\n-------\n\n### Candidate\n\n Candidate(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nA candidate to consider for a given panel. Currently only\nServingConfig are valid\ncandidates.\n\n.. _oneof: \u003chttps://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields\u003e\n\n### Panel\n\n Panel(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nAn individual panel with a list of\nServingConfigs to\nconsider for it.\n\n### Restriction\n\n Restriction(value)\n\nRestrictions of expected returned results. \n\n Example:\n\n `Panel1 candidates`: pdp_ctr, pdp_cvr,\n home_page_ctr_no_diversity\n\n `Panel2 candidates`: home_page_ctr_no_diversity,\n home_page_ctr_diversity, pdp_cvr_no_diversity\n\n `Restriction` = NO_RESTRICTION\n\n `Valid combinations`:\n\n - (pdp_ctr, home_page_ctr_no_diversity)\n - (pdp_ctr, home_page_ctr_diversity)\n - (pdp_ctr, pdp_cvr_no_diversity)\n - (pdp_cvr, home_page_ctr_no_diversity)\n - (pdp_cvr, home_page_ctr_diversity)\n - (pdp_cvr, pdp_cvr_no_diversity)\n - (home_page_ctr_no_diversity, home_page_ctr_no_diversity)\n - (home_page_ctr_no_diversity, home_page_ctr_diversity)\n - (home_page_ctr_no_diversity, pdp_cvr_no_diversity)\n\n `Invalid combinations`: []\n UNIQUE_SERVING_CONFIG_RESTRICTION (2):\n Do not allow the same\n \u003cxref uid=\"google.cloud.retail.v2alpha.ServingConfig.name\"\u003eServingConfig.name\u003c/xref\u003e\n to be shown on multiple panels.\n\n Example:\n\n `Panel1 candidates`: pdp_ctr, pdp_cvr,\n home_page_ctr_no_diversity\n\n `Panel2 candidates`: home_page_ctr_no_diversity,\n home_page_ctr_diversity_low, pdp_cvr_no_diversity\n\n `Restriction` = `UNIQUE_SERVING_CONFIG_RESTRICTION`\n\n `Valid combinations`:\n\n - (pdp_ctr, home_page_ctr_no_diversity)\n - (pdp_ctr, home_page_ctr_diversity_low)\n - (pdp_ctr, pdp_cvr_no_diversity)\n - (pdp_ctr, pdp_cvr_no_diversity)\n - (pdp_cvr, home_page_ctr_no_diversity)\n - (pdp_cvr, home_page_ctr_diversity_low)\n - (pdp_cvr, pdp_cvr_no_diversity)\n - (home_page_ctr_no_diversity, home_page_ctr_diversity_low)\n - (home_page_ctr_no_diversity, pdp_cvr_no_diversity)\n\n `Invalid combinations`:\n\n - (home_page_ctr_no_diversity, home_page_ctr_no_diversity)\n UNIQUE_MODEL_RESTRICTION (3):\n Do not allow multiple\n \u003cxref uid=\"google.cloud.retail.v2alpha.ServingConfig\"\u003eServingConfigs\u003c/xref\u003e\n with same\n \u003cxref uid=\"google.cloud.retail.v2alpha.Model.name\"\u003eModel.name\u003c/xref\u003e to be\n show on on different panels.\n\n Example:\n\n `Panel1 candidates`: pdp_ctr, pdp_cvr,\n home_page_ctr_no_diversity\n\n `Panel2 candidates`: home_page_ctr_no_diversity,\n home_page_ctr_diversity_low, pdp_cvr_no_diversity\n\n `Restriction` = `UNIQUE_MODEL_RESTRICTION`\n\n `Valid combinations`:\n\n - (pdp_ctr, home_page_ctr_no_diversity)\n - (pdp_ctr, home_page_ctr_diversity)\n - (pdp_ctr, pdp_cvr_no_diversity)\n - (pdp_ctr, pdp_cvr_no_diversity)\n - (pdp_cvr, home_page_ctr_no_diversity)\n - (pdp_cvr, home_page_ctr_diversity_low)\n - (home_page_ctr_no_diversity, pdp_cvr_no_diversity)\n\n `Invalid combinations`:\n\n - (home_page_ctr_no_diversity, home_page_ctr_no_diversity)\n - (pdp_cvr, pdp_cvr_no_diversity)\n UNIQUE_MODEL_TYPE_RESTRICTION (4):\n Do not allow multiple\n \u003cxref uid=\"google.cloud.retail.v2alpha.ServingConfig\"\u003eServingConfigs\u003c/xref\u003e\n with same\n \u003cxref uid=\"google.cloud.retail.v2alpha.Model.type\"\u003eModel.type\u003c/xref\u003e to be\n shown on different panels.\n\n Example:\n\n `Panel1 candidates`: pdp_ctr, pdp_cvr,\n home_page_ctr_no_diversity\n\n `Panel2 candidates`: home_page_ctr_no_diversity,\n home_page_ctr_diversity_low, pdp_cvr_no_diversity\n\n `Restriction` = `UNIQUE_MODEL_RESTRICTION`\n\n `Valid combinations`:\n\n - (pdp_ctr, home_page_ctr_no_diversity)\n - (pdp_ctr, home_page_ctr_diversity)\n - (pdp_cvr, home_page_ctr_no_diversity)\n - (pdp_cvr, home_page_ctr_diversity_low)\n - (home_page_ctr_no_diversity, pdp_cvr_no_diversity)\n\n `Invalid combinations`:\n\n - (pdp_ctr, pdp_cvr_no_diversity)\n - (pdp_ctr, pdp_cvr_no_diversity)\n - (pdp_cvr, pdp_cvr_no_diversity)\n - (home_page_ctr_no_diversity, home_page_ctr_no_diversity)\n - (home_page_ctr_no_diversity, home_page_ctr_diversity)"]]