Search

Automated Retraining

Overview

Machine learning models are trained with data fed into them during training. Data itself is more dynamic as business conditions, economies, and sales data change rapidly. Having your models periodically, and automatically, retrain with up-to-date data will keep them from becoming stale — ensuring that their prediction accuracy does not weaken over time.

This tutorial will cover how to set up automated retraining of your machine-learning models.


Components

Requirements

  • Access to an Infor CloudSuite
  • Infor AI Security Roles:
    • COLEMANAI-User
    • COLEMANAI-Administrator
  • User privileges to ION workflow
  • An AI quest that:
    • Draws data from Data Lake
    • Runs successfully
    • Has a deployed Endpoint
  • A dataflow that updates the data in the Data Lake

Tutorial

Difficulty: Easy
Time estimate: 30 minutes

In this tutorial, we will create a workflow in ION that will periodically run an automatic model update for the desired Infor AI model. Before we get started with the actual workflow, we will need to download the service account credentials

In order for ION Workflow to later call the Infor AI API a service account must be created.

1. Service Account Credentials Download

  • Navigate to the security section of Infor OS. Use the menu on the left (hamburger menu) and go to Manage > Service Accounts
  • Click the + for Add new item
  • Add your username to the username field
  • Save the Service Account Credentials locally with the save icon. It will download a CSV file named “Service Account” that includes the tenant name and a unique identifier.

2. Navigate to ION

Automated retraining will take place in Infor ION. Navigate to ION in Infor OS and using the side menu select Monitors & Workflows > Workflows.

3. Create a new workflow

Use the interface to create a new workflow by clicking +Add. Certainly, you could add these steps to larger existing workflows, but we are going to model this in a new workflow that will just be focused on the retraining.

4. Add AI Task

Drag the AI task from the pool of available workflow activities to the workflow.

5. Settings

Click on the AI block to access its properties. In the AI task dropdown, select “Reload Datasets” for the first activity. Identify the quest name and import the service account file we created in step one. The quest name serves as the identifier for all activities, so even if you are reloading data sets select the quest that those datasets are called from. Rename the activity as appropriate.

6. Test Configuration

Move to the “Test” hub and click the test button. This should tell you if the AI task, quest name, and service account are valid and agree with each other.

7. Error Handling

In the settings tab, specify how you want errors handled. You can optionally select to continue the workflow and send error messages, however, it makes more sense in the retraining case to select “The Workflow Fails”, as it doesn’t make sense to continue with retraining activities if the data has failed to update.

8. Repeat for each of the four retraining activities.

There are four options available in a AI task that appear in the dropdown. Executing these tasks in succession will complete a retraining cycle. Create one activity for each of the available tasks in this order:

  • Reload Datasets
  • Retrain Model
  • Update Production Quest
  • Redeploy endpoint

Once completed, your workflow should look something like this, and the error/notification bubbles should all be resolved. Be sure to save the workflow.

10. Schedule retraining

Back in the left-hand ION navigation menu, under Monitors & Workflows, navigate to Workflow Schedules. Create a new workflow schedule with the “+Add” button and give it a name and description. Use the schedule panel to detail when you would like the workflow to run, and at what frequency. In the action panel, find the workflow you created above and select it in the dropdown. In the “Trigger Workflow Instance” dropdown, select skip if the workflow is running.

Retraining frequency should be scheduled to account for frequency of variations in data that we expect to affect the model predictions. For instance, daily or weekly retraining on data updated on a daily or weekly basis will likely not produce measurable model changes. Retraining on a monthly, seasonally, or even yearly basis will give the data a chance to have a significant effect on the model.

11. Activate

Using the toolbar at the top, save the workflow schedule and click activate. Your workflow is now configured for automated retraining and will trigger at the specified time. To verify that retraining occurred, examine the quest in Infor AI. There will be two locations that tell you the quest was triggered from ION Workflows, the quest tile on the quest home screen, and the status messages on the left-hand side of the quest when you open it.