Lesson 4 of 5 MLOps Orchestration and Model Versioning

Automating Model Retraining

This lesson explains retraining mechanisms that rebuild models on fresh data on a schedule or in response to signals, and integrate the result safely into deployment, since models decay as the world changes.

Learning outcomes

After completing this lesson, you will be able to:

  • Choose scheduled, data-driven or drift-triggered retraining.
  • Integrate retrained models safely.
  • Choose the retraining data window.

Retraining triggers

Scheduled retraining (EventBridge Scheduler starting a pipeline weekly or monthly) suits predictable change. Data-driven retraining starts when enough new labelled data arrives, detected by S3 events or a data pipeline's completion. Monitoring-driven retraining starts when Model Monitor reports data drift or model quality violations: CloudWatch alarms on the monitoring metrics feed EventBridge rules that start the training pipeline. Business-metric alarms, such as a falling conversion rate, can trigger it too.

The following diagram shows a retraining loop for a pricing model that is triggered when data drift persists.

The drift-triggered retraining loop for the pricing model. Model Monitor runs hourly; a CloudWatch alarm fires after drift stays above the threshold for three periods; an EventBridge rule starts the training pipeline, which validates, trains, compares the challenger with the champion and registers it for approval; and the approval event starts a canary deployment with rollback alarms.
The scenario is illustrative.
Sort into groups

Choose the trigger

Exam skills 3.3.5

Decide which retraining trigger fits each situation.

Log in to try this activity Interactive activities are free with an account.

Safe integration

Retraining should run the same pipeline as the original model: validate data, train, evaluate against the current production model on the same test set (champion and challenger), register the new version only if it is better, and deploy through the normal approval and canary process. Retraining should never deploy automatically without evaluation, because drift can also be caused by data errors that would make the new model worse.

Choosing a strategy

Retraining can be triggered in several ways, each suited to different situations. Scheduled retraining, for example weekly, suits data that changes steadily and predictably. Event-driven retraining, triggered by drift detected by Model Monitor or by new labelled data arriving, retrains only when needed. Performance-triggered retraining responds to a measured drop in accuracy once ground-truth labels are available. In every case, the new model must beat the current one before deployment. The following table summarises the strategies.

TriggerMechanismSuits
ScheduleEventBridge Scheduler to SageMaker pipelineRegular, predictable change
New data volumeS3 or pipeline events to EventBridgeLabel batches arriving irregularly
Drift or quality violationModel Monitor metrics, CloudWatch alarm, EventBridgeUnpredictable change
Business metricCloudWatch alarm on custom metricOutcome-driven retraining

Choosing the retraining data

A retraining run must decide which data to learn from. An expanding window trains on all history up to the present, which suits slowly changing problems and small datasets. A sliding window trains only on the most recent period, such as the last 12 months, which suits problems where old behaviour no longer applies, at the cost of discarding rare examples. Many teams weight recent data more heavily instead of dropping older data entirely.

Label delay limits how fresh a model can be. A churn label is known only after the churn window ends, and a loan default label may take months, so the newest inputs often have no labels yet. Retraining more often than labels arrive adds cost without adding information, and the retraining cadence should therefore follow the arrival of labelled data, not only the arrival of inputs.

The evaluation data must also reflect the present. Holding out the most recent labelled period as the test set, rather than a random sample, shows how the challenger and the champion perform on the conditions the new model will face. Finally, every retraining run should validate its input data first, for example with Glue Data Quality rules: a drift alarm caused by a broken upstream feed would otherwise start a retraining run that learns from corrupted data. For large models, warm starting from the previous model's weights or checkpoint can shorten retraining, but the result still passes the same evaluation gate.

Scenario questions

Which data to retrain on?

Exam skills 3.3.5

Choose the training data for a retraining run.

Log in to try this activity Interactive activities are free with an account.
Worked example

Drift-triggered retraining

A pricing model's input distributions shift whenever competitors change prices, which happens unpredictably.

Model Monitor (hourly) -> CloudWatch metric feature_baseline_drift_price
CloudWatch alarm (drift > threshold for 3 periods) -> EventBridge rule
EventBridge rule -> start SageMaker pipeline "pricing-train" (parameter: latest data)
Pipeline: validate -> train -> evaluate vs. champion -> register (PendingManualApproval)
Approval event -> deployment pipeline -> canary with rollback alarms

Requiring three consecutive periods above the threshold avoids retraining on short blips, and the champion comparison prevents a worse model from replacing a good one.

Check yourself

What should happen before a retrained model is registered?

Show answer

The new challenger should be compared with the current champion on the same evaluation.

Exam Tips

Remember for the exam

  • Unpredictable change: retrain on Model Monitor drift alarms via EventBridge.
  • Predictable change: scheduled retraining with EventBridge Scheduler.
  • Compare the retrained challenger against the champion before registering.
  • Deploy retrained models through the normal approval and canary process.
  • Avoid retraining on short blips by requiring sustained alarms.