Personalize / Client / update_recommender

update_recommender#

Personalize.Client.update_recommender(**kwargs)#

Updates the recommender to modify the recommender configuration. If you update the recommender to modify the columns used in training, Amazon Personalize automatically starts a full retraining of the models backing your recommender. While the update completes, you can still get recommendations from the recommender. The recommender uses the previous configuration until the update completes. To track the status of this update, use the latestRecommenderUpdate returned in the DescribeRecommender operation.

See also: AWS API Documentation

Request Syntax

response = client.update_recommender(
    recommenderArn='string',
    recommenderConfig={
        'itemExplorationConfig': {
            'string': 'string'
        },
        'minRecommendationRequestsPerSecond': 123,
        'trainingDataConfig': {
            'excludedDatasetColumns': {
                'string': [
                    'string',
                ]
            }
        },
        'enableMetadataWithRecommendations': True|False
    }
)
Parameters:
  • recommenderArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the recommender to modify.

  • recommenderConfig (dict) –

    [REQUIRED]

    The configuration details of the recommender.

    • itemExplorationConfig (dict) –

      Specifies the exploration configuration hyperparameters, including explorationWeight and explorationItemAgeCutOff, you want to use to configure the amount of item exploration Amazon Personalize uses when recommending items. Provide itemExplorationConfig data only if your recommenders generate personalized recommendations for a user (not popular items or similar items).

      • (string) –

        • (string) –

    • minRecommendationRequestsPerSecond (integer) –

      Specifies the requested minimum provisioned recommendation requests per second that Amazon Personalize will support. A high minRecommendationRequestsPerSecond will increase your bill. We recommend starting with 1 for minRecommendationRequestsPerSecond (the default). Track your usage using Amazon CloudWatch metrics, and increase the minRecommendationRequestsPerSecond as necessary.

    • trainingDataConfig (dict) –

      Specifies the training data configuration to use when creating a domain recommender.

      • excludedDatasetColumns (dict) –

        Specifies the columns to exclude from training. Each key is a dataset type, and each value is a list of columns. Exclude columns to control what data Amazon Personalize uses to generate recommendations.

        For example, you might have a column that you want to use only to filter recommendations. You can exclude this column from training and Amazon Personalize considers it only when filtering.

        • (string) –

          • (list) –

            • (string) –

    • enableMetadataWithRecommendations (boolean) –

      Whether metadata with recommendations is enabled for the recommender. If enabled, you can specify the columns from your Items dataset in your request for recommendations. Amazon Personalize returns this data for each item in the recommendation response. For information about enabling metadata for a recommender, see Enabling metadata in recommendations for a recommender.

      If you enable metadata in recommendations, you will incur additional costs. For more information, see Amazon Personalize pricing.

Return type:

dict

Returns:

Response Syntax

{
    'recommenderArn': 'string'
}

Response Structure

  • (dict) –

    • recommenderArn (string) –

      The same recommender Amazon Resource Name (ARN) as given in the request.

Exceptions

  • Personalize.Client.exceptions.InvalidInputException

  • Personalize.Client.exceptions.ResourceNotFoundException

  • Personalize.Client.exceptions.ResourceInUseException