Creating a solution version
After you complete Creating and configuring a solution, you are ready to start training:
-
If your solution uses automatic training, the solution creates solution versions for you at the training frequency you specify. By default, all new solutions use automatic training to create a new solution version every 7 days. You can still manually create solution versions. For more information, see Configuring automatic training.
-
If you turn off auto training for your solution or you want to manually train, you can manually create a solution version. A solution version refers to a trained machine learning model. You can create a solution version using the console, Amazon Command Line Interface (Amazon CLI), or Amazon SDKs. If your solution version has a status of CREATE_PENDING or CREATE_IN_PROGRESS, you can use the StopSolutionVersionCreation operation to stop the solution version creation process. See Stopping the creation of a solution version.
Topics
Creating a solution version (console)
When you initially create your solution with the Amazon Personalize console, you also create a solution version. On the solution details page, you can track training progress in the Solution versions section. When training is complete, the status is Active and you are ready to . See Creating a campaign or Batch recommendations and user segments (custom resources).
If you want to create an additional solution version for an existing solution, create a new solution version from the solution overview page as follows.
To create a new solution version
-
Open the Amazon Personalize console at https://console.amazonaws.cn/personalize/home
and sign into your account. -
Navigate to the dataset groups page and choose the dataset group with your new solution.
-
In the navigation pane, under Custom resources, choose Solutions and recipes.
-
On the Solution and recipes page, choose the solution you want to create a solution version for.
-
On the solution overview page, choose Create solution version to start training a new model.
On the solution details page, you can track training progress in the Solution versions section. When training is complete, the status is Active you can evaluate it using metrics supplied by Amazon Personalize. For more information, see Evaluating a solution version with metrics.
If training does not complete because of an error, you are not charged for the training. If your solution version has a status of CREATE_PENDING or CREATE_IN_PROGRESS, you can stop the solution version creation process. To stop solution version creation, navigate to the solution version details page and choose Stop. See Stopping the creation of a solution version.
How you use an active solution version depends on how you get recommendations:
For real-time recommendations, you deploy an ACTIVE solution version with an Amazon Personalize campaign. You use the campaign to get recommendations for your users. See Creating a campaign.
-
For batch recommendations, you specify an ACTIVE solution version when you create a batch inference job or batch segment job. See Batch recommendations and user segments (custom resources).
Creating a solution version (Amazon CLI)
When your solution is ACTIVE, train the model by running the following
command. Replace solution arn
with the solution Amazon Resource Name (ARN) from Creating and configuring a solution.
aws personalize create-solution-version \ --solution-arn
solution arn
The solution version ARN is displayed, for example:
{ "solutionVersionArn": "arn:aws:personalize:us-west-2:acct-id:solution/SolutionName/<version-id>" }
Check the training status of the solution version by using the
describe-solution-version
command. Provide the solution version ARN that
was returned in the previous step. For more information about the API, see DescribeSolutionVersion.
aws personalize describe-solution-version \ --solution-version-arn
solution version arn
The properties of the solution version and the training status
are
displayed. Initially, the status shows as CREATE PENDING, for example:
{ "solutionVersion": { "solutionVersionArn": "arn:aws:personalize:us-west-2:acct-id:solution/solutionName/<version-id>", ..., "status": "CREATE PENDING" } }
Training is complete when the status
is ACTIVE
and you can evaluate it using metrics supplied by Amazon Personalize.
For more information, see Evaluating a solution version with metrics. If training does not complete because of an error, you are not charged for the training.
If your solution version has a status of CREATE_PENDING or CREATE_IN_PROGRESS, you can use the StopSolutionVersionCreation operation to stop the solution version creation process. See Stopping the creation of a solution version.
How you use an active solution version depends on how you get recommendations:
For real-time recommendations, you deploy an ACTIVE solution version with an Amazon Personalize campaign. You use the campaign to get recommendations for your users. See Creating a campaign.
-
For batch recommendations, you specify an ACTIVE solution version when you create a batch inference job or batch segment job. See Batch recommendations and user segments (custom resources).
Creating a solution version (Amazon SDKs)
When your solution is ACTIVE, use the following code to create a solution version. Specify the Amazon Resource Name (ARN) from Creating and configuring a solution. Use the DescribeSolutionVersion operation to retrieve the solution version's status.
To check the current solution version status, call the DescribeSolutionVersion operation
and pass the ARN of the solution version returned from the CreateSolutionVersion
operation. Training is complete when the status
is ACTIVE
and you can evaluate it using metrics supplied by Amazon Personalize.
For more information, see Evaluating a solution version with metrics. If training does not complete because of an error, you are not charged for the training.
If your solution version has a status of CREATE_PENDING or CREATE_IN_PROGRESS, you can use the StopSolutionVersionCreation operation to stop the solution version creation process. See Stopping the creation of a solution version.
How you use an active solution version depends on how you get recommendations:
For real-time recommendations, you deploy an ACTIVE solution version with an Amazon Personalize campaign. You use the campaign to get recommendations for your users. See Creating a campaign.
-
For batch recommendations, you specify an ACTIVE solution version when you create a batch inference job or batch segment job. See Batch recommendations and user segments (custom resources).