Amazon Customize is excited to announce automatic solutions training. Solution training is fundamental to maintaining the effectiveness of a model and ensuring that recommendations align with changing user behaviors and preferences. As data patterns and trends evolve over time, retraining the solution with the latest relevant data allows the model to learn and adapt, improving its predictive accuracy. Automatic training generates a new version of the solution, mitigating model drift and keeping recommendations relevant to current end-user behaviors while including the most recent elements. Ultimately, automatic training provides a more personalized and engaging experience that adapts to changing preferences.
Amazon Personalize accelerates your digital transformation with machine learning (ML), making it easier to integrate personalized recommendations into existing websites, apps, email marketing systems, and more. Amazon Personalize allows developers to quickly implement a custom personalization engine, without requiring ML expertise. Amazon Personalize provides the necessary infrastructure and manages the entire ML pipeline, including data processing, feature identification, use of appropriate algorithms, and model training, optimization, and hosting personalized based on your data. All your data is encrypted to be private and secure.
In this article, we guide you through the process of setting up automatic training, so that your solutions and recommendations remain accurate and relevant.
Solution Overview
A solution refers to the combination of an Amazon Personalize recipe, custom parameters, and one or more solution versions (trained models). When you create a custom solution, you specify a recipe that matches your use case and configure training settings. For this article, you configure automatic training in the training settings.
Preconditions
To enable automatic training for your solutions, you must first configure Amazon Personalize resources. Starts with creating a dataset groupdiagrams and datasets representing your elements, interactions and user data. For instructions, see Getting started (console) Or Getting started (AWS CLI).
Once you have finished importing your data, you are ready to create a solution.
Create a solution
To configure automatic training, follow these steps:
- On the Amazon Personalize console, create a new solution.
- Specify a name for your solution, choose the type of solution you want to create, and choose your recipe.
- Optionally add tags. For more information about tagging Amazon Personalize resources, see Tagging Amazon Personalize resources.
- To use the automatic feed, in the Automatic training section, select To light up and specify your training frequency.
Auto-training is enabled by default to train once every 7 days. You can configure the training cadence according to your business needs, ranging from once every 1 to 30 days.
- If your recipe generates item recommendations or user segments, optionally use the option Columns for training to choose the columns that Amazon Personalize considers when training solution versions.
- In the Configuring hyperparameters sectionOptionally configure all hyperparameter options based on your recipe and business needs.
- Provide any additional configurations and then choose Following.
- Review the solution details and confirm that your automated training is configured as expected.
- Choose Create a solution.
Amazon Personalize will automatically create your first solution version. A solution version refers to a trained ML model. When a solution version is created for the solution, Amazon Personalize trains the model that supports the solution version based on the recipe and training configuration. It may take up to 1 hour to start creating the solution version.
Here is sample code to create an auto-training solution using the AWS SDK:
After a solution is created, you can confirm whether autotraining is enabled on the solution details page.
You can also use the following code example to confirm via the AWS SDK that autotraining is enabled:
Your response will contain the fields performAutoTraining
And autoTrainingConfig
displaying the values you set in the CreateSolution
call.
On the solution details page, you will also see the automatically created solution versions. THE Type of training The column indicates whether the solution version was created manually or automatically.
You can also use the following code example to return a list of solution versions for the given solution:
Your response will contain the field trainingType
which specifies whether the solution version was created manually or automatically.
When your solution version is ready, you can create a campaign for your solution version.
Create a campaign
A campaign deploys a solution version (trained model) to generate real-time recommendations. With Amazon Personalize, you can streamline your workflow and automate the deployment of the latest version of the solution to campaigns via automatic synchronization. To configure automatic synchronization, follow these steps:
- On the Amazon Personalize console, create a new campaign.
- Specify a name for your campaign.
- Choose the solution you just created.
- Select Automatically use the latest version of the solution.
- Put it on minimum number of provisioned transactions per second.
- Create your campaign.
The campaign is ready when its status is ACTIVE
.
The following is sample code to create a campaign with syncWithLatestSolutionVersion
put to true
using the AWS SDK. You must also add the suffix $LATEST
At solutionArn
In solutionVersionArn
when you define syncWithLatestSolutionVersion
has true
.
On the campaign details page, you can see if auto-sync is enabled for the selected campaign. When enabled, your campaign will automatically update to use the most recent version of the solution, whether it was created automatically or manually.
Use the following code example to confirm via the AWS SDK that syncWithLatestSolutionVersion
is authorized:
Your response will contain the field syncWithLatestSolutionVersion
below campaignConfig
displaying the value you set in the CreateCampaign
call.
You can enable or disable the option to automatically use the latest version of the solution in the Amazon Personalize console after creating a campaign by updating your campaign. Likewise, you can enable or disable syncWithLatestSolutionVersion
with UpdateCampaign
using the AWS SDK.
Conclusion
With automatic training, you can mitigate model drift and keep recommendations relevant by streamlining your workflow and automating the deployment of the latest solution version in Amazon Personalize.
For more information about optimizing your user experience with Amazon Personalize, visit Amazon Customize Developer Guide.
About the authors
Ba'Carri Johnson is a Senior Technical Product Manager working with AWS AI/ML on the Amazon Personalize team. With a background in IT and strategy, she is passionate about product innovation. In her free time, she enjoys traveling and exploring the great outdoors.
Ajay Venkatakrishnan is a software development engineer on the Amazon Personalize team. In his spare time, he enjoys writing and playing football.
Pranesh Anubhav is a senior software engineer for Amazon Personalize. He is passionate about building machine learning systems to serve customers at scale. Outside of work, he loves playing football and is an avid Real Madrid fan.