Amazon Personalize

2020/03/18 - Amazon Personalize - 2 updated api methods

Changes  Update personalize client to latest version

DescribeSolutionVersion (updated) Link ¶
Changes (response)
{'solutionVersion': {'tunedHPOParams': {'algorithmHyperParameters': {'string': 'string'}}}}

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',
        'tunedHPOParams': {
            'algorithmHyperParameters': {
                'string': 'string'
            }
        },
        '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).

          • hpoObjective (dict) --

            The metric to optimize during HPO.

            • type (string) --

              The type of the metric. Valid values are Maximize and Minimize .

            • 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.

      • tunedHPOParams (dict) --

        If hyperparameter optimization was performed, contains the hyperparameter values of the best performing model.

        • algorithmHyperParameters (dict) --

          A list of the hyperparameter values of the best performing model.

          • (string) --

            • (string) --

      • 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.

ListBatchInferenceJobs (updated) Link ¶
Changes (response)
{'batchInferenceJobs': {'solutionVersionArn': 'string'}}

Gets a list of the batch inference jobs that have been performed off of a solution version.

See also: AWS API Documentation

Request Syntax

client.list_batch_inference_jobs(
    solutionVersionArn='string',
    nextToken='string',
    maxResults=123
)
type solutionVersionArn

string

param solutionVersionArn

The Amazon Resource Name (ARN) of the solution version from which the batch inference jobs were created.

type nextToken

string

param nextToken

The token to request the next page of results.

type maxResults

integer

param maxResults

The maximum number of batch inference job results to return in each page. The default value is 100.

rtype

dict

returns

Response Syntax

{
    'batchInferenceJobs': [
        {
            'batchInferenceJobArn': 'string',
            'jobName': 'string',
            'status': 'string',
            'creationDateTime': datetime(2015, 1, 1),
            'lastUpdatedDateTime': datetime(2015, 1, 1),
            'failureReason': 'string',
            'solutionVersionArn': 'string'
        },
    ],
    'nextToken': 'string'
}

Response Structure

  • (dict) --

    • batchInferenceJobs (list) --

      A list containing information on each job that is returned.

      • (dict) --

        A truncated version of the BatchInferenceJob datatype. The ListBatchInferenceJobs operation returns a list of batch inference job summaries.

        • batchInferenceJobArn (string) --

          The Amazon Resource Name (ARN) of the batch inference job.

        • jobName (string) --

          The name of the batch inference job.

        • status (string) --

          The status of the batch inference job. The status is one of the following values:

          • PENDING

          • IN PROGRESS

          • ACTIVE

          • CREATE FAILED

        • creationDateTime (datetime) --

          The time at which the batch inference job was created.

        • lastUpdatedDateTime (datetime) --

          The time at which the batch inference job was last updated.

        • failureReason (string) --

          If the batch inference job failed, the reason for the failure.

        • solutionVersionArn (string) --

          The ARN of the solution version used by the batch inference job.

    • nextToken (string) --

      The token to use to retreive the next page of results. The value is null when there are no more results to return.