CreateSolution
Important
By default, all new solutions use automatic training. With automatic training, you incur training costs while
your solution is active. To avoid unnecessary costs, when you are finished you can
update the solution to turn off automatic training.
For information about training
costs, see Amazon Personalize pricing
Creates the configuration for training a model (creating a solution version). This configuration includes the recipe to use for model training and optional training configuration, such as columns to use in training and feature transformation parameters. For more information about configuring a solution, see Creating and configuring a solution.
By default, new solutions use automatic training to create solution versions every 7 days. You can change the training frequency. Automatic solution version creation starts within one hour after the solution is ACTIVE. If you manually create a solution version within the hour, the solution skips the first automatic training. For more information, see Configuring automatic training.
To turn off automatic training, set performAutoTraining to false. If you turn off automatic training, you must manually create a solution version
by calling the CreateSolutionVersion operation.
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.
After training completes you can evaluate model accuracy by calling GetSolutionMetrics. When you are satisfied with the solution version, you deploy it using CreateCampaign. The campaign provides recommendations to a client through the GetRecommendations API.
Note
Amazon Personalize doesn't support configuring the hpoObjective
for solution hyperparameter optimization at this time.
Status
A solution can be in one of the following states:
-
CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
-
DELETE PENDING > DELETE IN_PROGRESS
To get the status of the solution, call DescribeSolution. If you use
manual training, the status must be ACTIVE before you call CreateSolutionVersion.
Request Syntax
{
"datasetGroupArn": "string",
"eventType": "string",
"name": "string",
"performAutoML": boolean,
"performAutoTraining": boolean,
"performHPO": boolean,
"performIncrementalUpdate": boolean,
"recipeArn": "string",
"solutionConfig": {
"algorithmHyperParameters": {
"string" : "string"
},
"autoMLConfig": {
"metricName": "string",
"recipeList": [ "string" ]
},
"autoTrainingConfig": {
"schedulingExpression": "string"
},
"eventsConfig": {
"eventParametersList": [
{
"eventType": "string",
"eventValueThreshold": number,
"weight": number
}
]
},
"eventValueThreshold": "string",
"featureTransformationParameters": {
"string" : "string"
},
"hpoConfig": {
"algorithmHyperParameterRanges": {
"categoricalHyperParameterRanges": [
{
"name": "string",
"values": [ "string" ]
}
],
"continuousHyperParameterRanges": [
{
"maxValue": number,
"minValue": number,
"name": "string"
}
],
"integerHyperParameterRanges": [
{
"maxValue": number,
"minValue": number,
"name": "string"
}
]
},
"hpoObjective": {
"metricName": "string",
"metricRegex": "string",
"type": "string"
},
"hpoResourceConfig": {
"maxNumberOfTrainingJobs": "string",
"maxParallelTrainingJobs": "string"
}
},
"optimizationObjective": {
"itemAttribute": "string",
"objectiveSensitivity": "string"
},
"trainingDataConfig": {
"excludedDatasetColumns": {
"string" : [ "string" ]
},
"includedDatasetColumns": {
"string" : [ "string" ]
}
}
},
"tags": [
{
"tagKey": "string",
"tagValue": "string"
}
]
}
Request Parameters
The request accepts the following data in JSON format.
- datasetGroupArn
-
The Amazon Resource Name (ARN) of the dataset group that provides the training data.
Type: String
Length Constraints: Maximum length of 256.
Pattern:
arn:([a-z\d-]+):personalize:.*:.*:.+Required: Yes