CustomerProfiles / Client / update_recommender

update_recommender

CustomerProfiles.Client.update_recommender(**kwargs)

Updates the properties of an existing recommender, allowing you to modify its configuration and description.

See also: AWS API Documentation

Request Syntax

response = client.update_recommender(
    DomainName='string',
    RecommenderName='string',
    Description='string',
    RecommenderConfig={
        'EventsConfig': {
            'EventParametersList': [
                {
                    'EventType': 'string',
                    'EventValueThreshold': 123.0,
                    'EventWeight': 123.0
                },
            ]
        },
        'TrainingFrequency': 123,
        'InferenceConfig': {
            'MinProvisionedTPS': 123
        },
        'IncludedColumns': {
            'string': [
                'string',
            ]
        },
        'ExcludedColumns': {
            'string': [
                'string',
            ]
        },
        'DiversityConfig': {
            'DiversityColumns': [
                {
                    'Name': 'string',
                    'CapType': 'PERCENTAGE'|'VALUE',
                    'Target': 'string'
                },
            ]
        }
    },
    RecommenderVersionName='string'
)
Parameters:
  • DomainName (string) –

    [REQUIRED]

    The unique name of the domain.

  • RecommenderName (string) –

    [REQUIRED]

    The name of the recommender to update.

  • Description (string) – The new description to assign to the recommender.

  • RecommenderConfig (dict) –

    The new configuration settings to apply to the recommender, including updated parameters and settings that define its behavior.

    • EventsConfig (dict) –

      Configuration settings for how the recommender processes and uses events.

      • EventParametersList (list) – [REQUIRED]

        A list of event parameters configurations that specify how different event types should be handled.

        • (dict) –

          Configuration parameters for events in the personalization system.

          • EventType (string) – [REQUIRED]

            The type of event being tracked (e.g., ‘click’, ‘purchase’, ‘view’).

          • EventValueThreshold (float) –

            The minimum value threshold that an event must meet to be considered valid.

          • EventWeight (float) –

            The weight of the event type. A higher weight means higher importance of the event type for the created solution.

    • TrainingFrequency (integer) –

      How often the recommender should retrain its model with new data. If set to 0, automatic retraining will not be enabled.

    • InferenceConfig (dict) –

      Configuration settings for how the recommender handles inference requests.

      • MinProvisionedTPS (integer) –

        The minimum provisioned transactions per second (TPS) that the recommender supports. The default value is 1. A high MinProvisionedTPS will increase your cost.

    • IncludedColumns (dict) –

      A map of dataset type to a list of column names to train on. The _webAnalytics and _catalogItem keys are supported. The column names must be a subset of the columns defined in the recommender schema. If not specified, all columns in the schema are used for training. The following columns are always included in training and do not need to be specified: Item.Id, EventTimestamp, and EventType for _webAnalytics; Id for _catalogItem. Mutually exclusive with ExcludedColumns — both cannot be specified in the same request.

      • (string) –

        • (list) –

          • (string) –

    • ExcludedColumns (dict) –

      A map of dataset type to a list of column names to exclude from training. The _webAnalytics and _catalogItem keys are supported. The column names must be valid columns defined in the recommender schema. All columns in the schema except the listed columns will be used for training. The following columns are mandatory and cannot be excluded: Item.Id, EventTimestamp, and EventType for _webAnalytics; Id for _catalogItem. Mutually exclusive with IncludedColumns — both cannot be specified in the same request.

      • (string) –

        • (list) –

          • (string) –

    • DiversityConfig (dict) –

      Configuration for diversity-aware recommendations. When set, the recommender applies diversity constraints defined per item column to reduce over-concentration of similar items in the results.

      • DiversityColumns (list) –

        A list of up to two diversity columns. Each column defines a cap on the number or percentage of recommended items that share the same value for that column.

        • (dict) –

          Defines a diversity constraint for a single item column, specifying a cap type and a target value or placeholder that controls how many recommended items may share the same column value.

          • Name (string) – [REQUIRED]

            The name of the item catalog column on which to apply the diversity cap. The column must be defined in the recommender schema.

          • CapType (string) – [REQUIRED]

            The type of diversity cap to apply. Valid values are PERCENTAGE (interpret Target as a percentage of returned items) and VALUE (interpret Target as an absolute count).

          • Target (string) – [REQUIRED]

            The diversity cap target. Either an integer literal (for example, "25") or a placeholder expression of the form $name whose value is supplied at inference time through GetProfileRecommendations.

  • RecommenderVersionName (string) – The name of a specific recommender version to activate as part of this update (for example, to roll back to a previously trained version).

Return type:

dict

Returns:

Response Syntax

{
    'RecommenderName': 'string'
}

Response Structure

  • (dict) –

    • RecommenderName (string) –

      The name of the recommender that was updated.

Exceptions