Step 2: Configuring a Solution - Amazon Personalize

Step 2: Configuring a Solution

Once you complete Step 1: Choosing a Recipe, you are ready to configure a solution for training a model.

Configuring a solution allows you customize training so the model meets your specific business needs. To configure a solution, you specify the dataset group with the data to be used for training, the recipe to be used for training, and any additional solution parameters and recipe-specific hyperparameters. If your Interactions training data includes EVENT_TYPE and EVENT_VALUE data, when you configure a solution you can filter out Interactions data before training.

You can create and configure a solution using the console, AWS Command Line Interface (AWS CLI), or AWS SDK.

Configuring a Solution (Console)

To configure a solution in the console, choose the dataset group containing the dataset you'll be using, and then specify a solution name, recipe, and optional recipe specific hyperparameters.

To configure a solution using the console

  1. Open the Amazon Personalize console at https://console.aws.amazon.com/personalize/ and sign in to your account.

  2. Choose the dataset group you want to use for training.

  3. On the dashboard, in the Create solutions section, choose the Start button.

    If you have already created a solution, choose the Create solution button.

  4. For Solution name, specify a name for your solution.

  5. For Recipe, choose a recipe (see Step 1: Choosing a Recipe).

  6. Expand the Solution configuration section and optionally configure any hyperparameter options based on your recipe and business needs. Different recipes use different hyperparameters. For the available hyperparameters, see the individual recipes in Step 1: Choosing a Recipe.

    An example of the Solution configuration options for the aws-user-personalization recipe is below.

    
              Solution configuration options for the aws-user-personalization recipe.
  7. Choose Next. The Create Solution Version page displays. Proceed to Creating a Solution Version (Console).

Configuring a Solution (AWS CLI)

To configure a solution using AWS CLI use the following create-solution operation. Specify the solution name, dataset group arn, and recipe arn using the following code.

aws personalize create-solution \ --name solution name \ --dataset-group-arn dataset group arn \ --recipe-arn recipe arn

The solution Amazon Resource Name (ARN) is displayed, for example:

{ "solutionArn": "arn:aws:personalize:<region>:solution/<solution name>" }

You can modify the above code to optimize recipe properties and hyperparameters (see Hyperparameters and HPO) or filter the Interactions data used for training (see Filtering Interactions Data Before Training).

Record the solution ARN for future use and proceed to Creating a Solution Version (AWS CLI).

Configuring a Solution (AWS Python SDK)

Create a new solution using the create_solution method. Replace solution name with your solution name, recipe arn with the recipe Amazon Rescource Name (ARN) from Step 1: Choosing a Recipe, and dataset group arn with the ARN of your dataset group.

import boto3 personalize = boto3.client('personalize') print('Creating solution') create_solution_response = personalize.create_solution( name='solution name', recipeArn= 'recipe arn', datasetGroupArn = 'dataset group arn' ) solution_arn = create_solution_response['solutionArn'] print('solution_arn: ', solution_arn)

You can modify the above code to optimize recipe properties and hyperparameters (see Hyperparameters and HPO) or filter the Interactions data used for training (see Filtering Interactions Data Before Training).

Record the solution ARN for future use and proceed to Creating a Solution Version (AWS Python SDK).