Production ML systems: Static versus dynamic training

Broadly speaking, you can train a model in either of two ways:

  • Static training (also called offline training) means that you train a model only once. You then serve that same trained model for a while.
  • Dynamic training (also called online training) means that you train a model continuously or at least frequently. You usually serve the most recently trained model.
Figure 2. Raw dough creates three identical loaves of bread.
Figure 2. Static training. Train once; serve the same built model multiple times. (Images by Pexels and by fancycrave1.)

 

Figure 3. Raw dough creates slightly different loaves of bread
            each time.
Figure 3. Dynamic training. Retrain frequently; serve the most recently built model. (Images by Pexels and by Couleur.)

 

Table 1. Primary advantages and disadvantages.

Static training Dynamic training
Advantages Simpler. You only need to develop and test the model once. More adaptable. Your model will keep up with any changes to the relationship between features and labels.
Disadvantages Sometimes staler. If the relationship between features and labels changes over time, your model's predictions will degrade. More work. You must build, test, and release a new product all the time.

If your dataset truly isn't changing over time, choose static training because it is cheaper to create and maintain than dynamic training. However, datasets tend to change over time, even those with features that you think are as constant as, say, sea level. The takeaway: even with static training, you must still monitor your input data for change.

For example, consider a model trained to predict the probability that users will buy flowers. Because of time pressure, the model is trained only once using a dataset of flower buying behavior during July and August. The model works fine for several months but then makes terrible predictions around Valentine's Day because user behavior during that floral holiday period changes dramatically.

For a more detailed exploration of static and dynamic training, see the Managing ML Projects course.

Exercises: Check your understanding

Which two of the following statements are true about static (offline) training?
The model stays up to date as new data arrives.
Very little monitoring of input data needs to be done at inference time.
Offline training requires less monitoring of training jobs than online training.
You can verify the model before applying it in production.
Which one of the following statements is true of dynamic (online) training?
Very little monitoring of input data needs to be done at inference time.
Very little monitoring of training jobs needs to be done.
The model stays up to date as new data arrives.