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.
Topics
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
-
Open the Amazon Personalize console at https://console.aws.amazon.com/personalize/
and sign in to your account. -
Choose the dataset group you want to use for training.
-
On the dashboard, in the Create solutions section, choose the Start button.
If you have already created a solution, choose the Create solution button.
-
For Solution name, specify a name for your solution.
-
For Recipe, choose a recipe (see Step 1: Choosing a Recipe).
-
Expand the Solution configuration section and, if you have added the respective columns to your Interactions dataset, optionally provide Event type and Event value threshold values to filter interactions data before training (for more information see Filtering Interactions Data Before Training).
If your Interactions dataset has multiple event types in an EVENT_TYPE column, and you do not provide an event type when you configure your Solution, Amazon Personalize uses all interactions data for training with equal weight regardless of type.
-
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. -
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-arndataset group arn
\ --recipe-arnrecipe 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).