Amazon Personalize

2019/10/14 - Amazon Personalize - 2 updated api methods

Changes  AWS Personalize: Adds ability to create a solution version using FULL or UPDATE training mode

CreateSolutionVersion (updated) Link ¶
Changes (request)
{'trainingMode': 'FULL | UPDATE'}

Trains or retrains an active solution. A solution is created using the CreateSolution operation and must be in the ACTIVE state before calling CreateSolutionVersion . A new version of the solution is created every time you call this operation.

Status

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

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

To get the status of the version, call DescribeSolutionVersion. Wait until the status shows as ACTIVE before calling CreateCampaign .

If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

Related APIs

  • ListSolutionVersions

  • DescribeSolutionVersion

  • ListSolutions

  • CreateSolution

  • DescribeSolution

  • DeleteSolution

See also: AWS API Documentation

Request Syntax

client.create_solution_version(
    solutionArn='string',
    trainingMode='FULL'|'UPDATE'
)
type solutionArn

string

param solutionArn

[REQUIRED]

The Amazon Resource Name (ARN) of the solution containing the training configuration information.

type trainingMode

string

param trainingMode

The scope of training to be performed when creating the solution version. The FULL option trains the solution version based on the entirety of the input solution's training data, while the UPDATE option processes only the data that has changed in comparison to the input solution. Choose UPDATE when you want to incrementally update your solution version instead of creating an entirely new one.

Warning

The UPDATE option can only be used when you already have an active solution version created from the input solution using the FULL option and the input solution was trained with the native-recipe-hrnn-coldstart recipe.

rtype

dict

returns

Response Syntax

{
    'solutionVersionArn': 'string'
}

Response Structure

  • (dict) --

    • solutionVersionArn (string) --

      The ARN of the new solution version.

DescribeSolutionVersion (updated) Link ¶
Changes (response)
{'solutionVersion': {'trainingMode': 'FULL | UPDATE'}}

Describes a specific version of a solution. For more information on solutions, see CreateSolution.

See also: AWS API Documentation

Request Syntax

client.describe_solution_version(
    solutionVersionArn='string'
)
type solutionVersionArn

string

param solutionVersionArn

[REQUIRED]

The Amazon Resource Name (ARN) of the solution version.

rtype

dict

returns

Response Syntax

{
    'solutionVersion': {
        'solutionVersionArn': 'string',
        'solutionArn': 'string',
        'performHPO': True|False,
        'performAutoML': True|False,
        'recipeArn': 'string',
        'eventType': 'string',
        'datasetGroupArn': 'string',
        'solutionConfig': {
            'eventValueThreshold': 'string',
            'hpoConfig': {
                'hpoObjective': {
                    'type': 'string',
                    'metricName': 'string',
                    'metricRegex': 'string'
                },
                'hpoResourceConfig': {
                    'maxNumberOfTrainingJobs': 'string',
                    'maxParallelTrainingJobs': 'string'
                },
                'algorithmHyperParameterRanges': {
                    'integerHyperParameterRanges': [
                        {
                            'name': 'string',
                            'minValue': 123,
                            'maxValue': 123
                        },
                    ],
                    'continuousHyperParameterRanges': [
                        {
                            'name': 'string',
                            'minValue': 123.0,
                            'maxValue': 123.0
                        },
                    ],
                    'categoricalHyperParameterRanges': [
                        {
                            'name': 'string',
                            'values': [
                                'string',
                            ]
                        },
                    ]
                }
            },
            'algorithmHyperParameters': {
                'string': 'string'
            },
            'featureTransformationParameters': {
                'string': 'string'
            },
            'autoMLConfig': {
                'metricName': 'string',
                'recipeList': [
                    'string',
                ]
            }
        },
        'trainingHours': 123.0,
        'trainingMode': 'FULL'|'UPDATE',
        'status': 'string',
        'failureReason': 'string',
        'creationDateTime': datetime(2015, 1, 1),
        'lastUpdatedDateTime': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) --

    • solutionVersion (dict) --

      The solution version.

      • solutionVersionArn (string) --

        The ARN of the solution version.

      • solutionArn (string) --

        The ARN of the solution.

      • performHPO (boolean) --

        Whether to perform hyperparameter optimization (HPO) on the chosen recipe. The default is false .

      • performAutoML (boolean) --

        When true, Amazon Personalize searches for the most optimal recipe according to the solution configuration. When false (the default), Amazon Personalize uses recipeArn .

      • recipeArn (string) --

        The ARN of the recipe used in the solution.

      • eventType (string) --

        The event type (for example, 'click' or 'like') that is used for training the model.

      • datasetGroupArn (string) --

        The Amazon Resource Name (ARN) of the dataset group providing the training data.

      • solutionConfig (dict) --

        Describes the configuration properties for the solution.

        • eventValueThreshold (string) --

          Only events with a value greater than or equal to this threshold are used for training a model.

        • hpoConfig (dict) --

          Describes the properties for hyperparameter optimization (HPO). For use with the bring-your-own-recipe feature. Not used with Amazon Personalize predefined recipes.

          • hpoObjective (dict) --

            The metric to optimize during HPO.

            • type (string) --

              The data type of the metric.

            • metricName (string) --

              The name of the metric.

            • metricRegex (string) --

              A regular expression for finding the metric in the training job logs.

          • hpoResourceConfig (dict) --

            Describes the resource configuration for HPO.

            • maxNumberOfTrainingJobs (string) --

              The maximum number of training jobs when you create a solution version. The maximum value for maxNumberOfTrainingJobs is 40 .

            • maxParallelTrainingJobs (string) --

              The maximum number of parallel training jobs when you create a solution version. The maximum value for maxParallelTrainingJobs is 10 .

          • algorithmHyperParameterRanges (dict) --

            The hyperparameters and their allowable ranges.

            • integerHyperParameterRanges (list) --

              The integer-valued hyperparameters and their ranges.

              • (dict) --

                Provides the name and range of an integer-valued hyperparameter.

                • name (string) --

                  The name of the hyperparameter.

                • minValue (integer) --

                  The minimum allowable value for the hyperparameter.

                • maxValue (integer) --

                  The maximum allowable value for the hyperparameter.

            • continuousHyperParameterRanges (list) --

              The continuous hyperparameters and their ranges.

              • (dict) --

                Provides the name and range of a continuous hyperparameter.

                • name (string) --

                  The name of the hyperparameter.

                • minValue (float) --

                  The minimum allowable value for the hyperparameter.

                • maxValue (float) --

                  The maximum allowable value for the hyperparameter.

            • categoricalHyperParameterRanges (list) --

              The categorical hyperparameters and their ranges.

              • (dict) --

                Provides the name and range of a categorical hyperparameter.

                • name (string) --

                  The name of the hyperparameter.

                • values (list) --

                  A list of the categories for the hyperparameter.

                  • (string) --

        • algorithmHyperParameters (dict) --

          Lists the hyperparameter names and ranges.

          • (string) --

            • (string) --

        • featureTransformationParameters (dict) --

          Lists the feature transformation parameters.

          • (string) --

            • (string) --

        • autoMLConfig (dict) --

          The AutoMLConfig object containing a list of recipes to search when AutoML is performed.

          • metricName (string) --

            The metric to optimize.

          • recipeList (list) --

            The list of candidate recipes.

            • (string) --

      • trainingHours (float) --

        The time used to train the model. You are billed for the time it takes to train a model. This field is visible only after Amazon Personalize successfully trains a model.

      • trainingMode (string) --

        The scope of training used to create the solution version. The FULL option trains the solution version based on the entirety of the input solution's training data, while the UPDATE option processes only the training data that has changed since the creation of the last solution version. Choose UPDATE when you want to start recommending items added to the dataset without retraining the model.

        Warning

        The UPDATE option can only be used after you've created a solution version with the FULL option and the training solution uses the native-recipe-hrnn-coldstart.

      • status (string) --

        The status of the solution version.

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

        • CREATE PENDING

        • CREATE IN_PROGRESS

        • ACTIVE

        • CREATE FAILED

      • failureReason (string) --

        If training a solution version fails, the reason for the failure.

      • creationDateTime (datetime) --

        The date and time (in Unix time) that this version of the solution was created.

      • lastUpdatedDateTime (datetime) --

        The date and time (in Unix time) that the solution was last updated.