Personalize / Client / update_solution

update_solution#

Personalize.Client.update_solution(**kwargs)#

Updates an Amazon Personalize solution to use a different automatic training configuration. When you update a solution, you can change whether the solution uses automatic training, and you can change the training frequency. For more information about updating a solution, see Updating a solution.

A solution update can be in one of the following states:

CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED

To get the status of a solution update, call the DescribeSolution API operation and find the status in the latestSolutionUpdate.

See also: AWS API Documentation

Request Syntax

response = client.update_solution(
    solutionArn='string',
    performAutoTraining=True|False,
    solutionUpdateConfig={
        'autoTrainingConfig': {
            'schedulingExpression': 'string'
        }
    }
)
Parameters:
  • solutionArn (string) –

    [REQUIRED]

    The Amazon Resource Name (ARN) of the solution to update.

  • performAutoTraining (boolean) –

    Whether the solution uses automatic training to create new solution versions (trained models). You can change the training frequency by specifying a schedulingExpression in the AutoTrainingConfig as part of solution configuration.

    If you turn on automatic training, the first automatic training starts within one hour after the solution update completes. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information about automatic training, see Configuring automatic training.

    After training starts, you can get the solution version’s Amazon Resource Name (ARN) with the ListSolutionVersions API operation. To get its status, use the DescribeSolutionVersion.

  • solutionUpdateConfig (dict) –

    The new configuration details of the solution.

    • autoTrainingConfig (dict) –

      The automatic training configuration to use when performAutoTraining is true.

      • schedulingExpression (string) –

        Specifies how often to automatically train new solution versions. Specify a rate expression in rate(value unit) format. For value, specify a number between 1 and 30. For unit, specify day or days. For example, to automatically create a new solution version every 5 days, specify rate(5 days). The default is every 7 days.

        For more information about auto training, see Creating and configuring a solution.

Return type:

dict

Returns:

Response Syntax

{
    'solutionArn': 'string'
}

Response Structure

  • (dict) –

    • solutionArn (string) –

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

Exceptions

  • Personalize.Client.exceptions.InvalidInputException

  • Personalize.Client.exceptions.ResourceNotFoundException

  • Personalize.Client.exceptions.ResourceInUseException

  • Personalize.Client.exceptions.LimitExceededException

  • Personalize.Client.exceptions.ResourceInUseException