What you will be able to do
- Structure an automated retraining pipeline as one multitask Lakeflow Job that reuses the production training code
- Choose between Scheduled, Table update, File arrival, Model update and Continuous triggers for a retraining or evaluation job
- Connect a drift or performance alert on monitor metric tables to a job so that crossing a threshold starts retraining
- Narrow many retraining candidates to the single best run with mlflow.search_runs
- Gate a retrained model with validation checks and promote it from Challenger to Champion only when it wins the comparison
Key concept
Closed retraining loop — Automated retraining reruns the same production training pipeline when a schedule, new data or a monitoring alert says so. It then narrows the result to one candidate, validates it as a Challenger and moves the Champion alias only if the Challenger wins, so inference picks up the better model without anyone redeploying it by hand.
1.The retraining loop and why it starts on a schedule
A model in production goes stale as the data it scores moves away from the data it learned from. Automated retraining is how you keep up without a data scientist rerunning notebooks. The production training pipeline doesn't care what started it: code changes and automated retraining jobs both kick off the same run, on tables from the production catalog. You don't build a second pipeline for retraining. You add more ways to start the one you already have.
Build that pipeline as one multitask Lakeflow Job, not a set of loose jobs that you hope run in the right order. The recommended layout puts model training first, then model validation, then model deployment. Each task starts only after the previous one succeeds. The training task produces a model URI and passes it to the validation task as a task value, so validation always loads the exact version that training just registered. If you need a feature refresh before training, it becomes the first task in the same job, so the order is enforced by the job graph.
Start on a schedule, and add triggers only when you need them. Databricks recommends beginning with periodic retraining and moving to triggered retraining when needed. If new data lands on a regular cadence, a scheduled job that retrains on the latest data is simple, predictable and easy to debug. Triggered retraining earns its extra wiring when the monitoring pipeline can reliably tell you the model is degrading, or when data arrives too irregularly for a fixed schedule to fit.
Checkpoint 1 of 9· Check yourself
A team is automating retraining for a production model. New labeled data lands every week, and their monitoring pipeline can't yet reliably tell when the model is degrading. Which approach matches Databricks' recommendation?
Databricks recommends starting with periodic, scheduled retraining, which suits data that arrives on a regular cadence. Triggered retraining comes later, once monitoring can reliably flag problems. Retraining reuses the existing production training pipeline; you don't build a second one.
“Databricks recommends beginning with scheduled, periodic retraining and moving to triggered retraining when needed.”Source: docs.databricks.com
Checkpoint 2 of 9· Put it in order
Put the tasks of the recommended multitask retraining job in order
- 1.Model validation: load the model from the URI passed as a task value and run validation checks
- 2.Model training: train on production-catalog tables, register the model version and output its model URI
- 3.Model deployment: put the validated model version into production use
In the recommended layout, training is the first task, followed by validation and then deployment. Each task starts only after the previous one succeeds, and the training task passes the model URI to validation as a task value.
“you deploy a multitask Databricks workflow in which the first task is the model training pipeline, followed by model validation and model deployment tasks.”Source: docs.databricks.com
Sources1
2.Choosing a Lakeflow Jobs trigger
Every Lakeflow Job has one trigger type, and the right one depends on the event your retraining should react to. Ask what changes in the world when a retrain is worth running: the clock, a table, a folder or a model. The five automatic trigger types each answer one of those questions. Running the job manually or from an outside orchestrator is also possible.
| Trigger | Fires when | Fits retraining when |
|---|---|---|
| Scheduled | A time-based schedule comes due | New data arrives on a regular cadence; the recommended starting point |
| Table update | One, any or all monitored tables receive a change such as an update, merge or delete | A feature or training table is refreshed by another process and retraining should follow only real commits |
| File arrival | New files appear in a monitored Unity Catalog external location or volume | Labeled batches are dropped into storage at irregular times |
| Model update (Beta) | A Unity Catalog model is created, a model version is ready, or a model alias is set | A downstream evaluation, testing or promotion job should run on each new version or alias change |
| Continuous | A job run completes or fails, which immediately starts the next run | The job must always be running; it does not wait for new data |
Table update fits when an upstream ETL job refreshes a Delta feature table. The trigger checks the table for updates and starts the job only when a commit lands. On a night when the ETL produces nothing, retraining doesn't run, and you don't need a continuously running cluster or any knowledge of the process that writes the table. With several tables you choose whether an update to any of them is enough or all of them must change. A scheduled job set to the ETL's usual finish time can't do this: it fires whether or not the table changed, and it fires too early on a night the ETL runs late.
File arrival fits when a partner drops files into a volume at unpredictable times. It watches the root or a subpath of a Unity Catalog external location or volume, checks every subdirectory under it, and checks for new files every minute on a best-effort basis. The feature exists for the case where irregular arrivals make a fixed schedule wasteful. Files written to a volume are not Delta commits, so a Table update trigger on some other table never sees them. A five-minute schedule is still polling, and a Continuous trigger restarts after every run whether or not anything new arrived.
Model update reacts to the registry, not to data. You pick a scope (one model, every model in a schema, or the whole metastore, which only a metastore admin can configure) and a condition: model created, model version ready, or a named alias set. That makes it the trigger for a separate evaluation job that should run on each new version before anyone assigns an alias. It is in Beta and replaces cron jobs that poll the registry for changes.
Two settings apply whatever trigger you pick. By default only one run of a job can be active at a time, and a run that would exceed the job's max concurrency is skipped. So a second file landing during a long retrain doesn't start a parallel run. For Table update triggers, the job's Run as principal needs SELECT on every monitored table, plus USE CATALOG and USE SCHEMA on its catalog and schema. Without them the trigger can't evaluate and the job never runs.
Checkpoint 3 of 9· Check yourself
An upstream ETL job refreshes a Delta feature table on most nights. Some nights it finishes late, and some nights it writes nothing. Retraining should run only after the ETL actually commits a change to that table. Which Lakeflow Jobs trigger fits?
A Table update trigger watches the table and runs the job only when a change is committed, so a night with no new data starts no retraining. A schedule fires whether or not the table changed, and it fires too early when the ETL runs late. A Continuous trigger restarts after every run even when no data changed. File arrival watches volumes and external locations, not Delta table commits.
“A table update trigger checks for table updates, and when a table is updated, the job is run.”Source: docs.databricks.com
Checkpoint 4 of 9· Exam question
A partner system drops new labeled training batches into a Unity Catalog volume at unpredictable times throughout the day, sometimes hours apart and sometimes twice within a minute. The ML team wants the retraining job to start as soon as each batch lands, without polling on a fixed cadence. Which trigger should they configure on the retraining job?
Correct answer: A — A File arrival trigger pointed at the volume, so the job launches as soon as new objects appear in that storage location.
- A. A File arrival trigger watches a Unity Catalog storage location and launches a run when new objects show up there, which matches an unpredictable, event-driven batch drop with no need for polling.
- B. A five-minute schedule still polls on a fixed cadence, so it either wastes runs when nothing new has arrived or delays reaction to a batch that lands right after a poll, which does not match the stated requirement.
- C. A Continuous trigger chains a new run to the completion of the previous one, which produces a perpetual loop unrelated to whether new files have actually arrived in the volume.
- D. Raw files landing in a volume are not the same event as a Delta table version commit, so a Table update trigger would never fire unless something separately ingests those files into a monitored table.
Checkpoint 5 of 9· Exam question
An engineering team maintains a Delta table of cleaned transaction features that a nightly ETL job refreshes with new rows. A separate retraining job should start automatically only after that feature table has actually been updated, and should not run at all on days when the ETL job produces no new commits. Which trigger configuration satisfies this?
Correct answer: A — A Table update trigger on the feature table, so the retraining job runs only when a new commit lands on that table.
- A. A Table update trigger fires specifically when the referenced table receives a new commit, which is exactly the condition described and avoids running on days when the ETL job produces nothing new.
- B. A fixed schedule assumes the ETL job always finishes at the same time, so it would still fire on days with no new commits and could also run before a delayed ETL job has actually written its update.
- C. Watching the raw input directory reacts to upstream files arriving, not to the feature table itself being committed, so it does not guarantee the table update has actually completed before retraining starts.
- D. The Champion alias only changes after a model is promoted, which happens after retraining, so tying the trigger to that alias would create a circular dependency rather than reacting to the feature table refresh.
Checkpoint 6 of 9· Exam question
A platform team wants a separate evaluation Workflow to kick off automatically the moment any new version of a specific registered model becomes ready in Unity Catalog, so results are available before anyone manually assigns an alias. Which Databricks Jobs trigger type is designed for this?
Correct answer: A — The Model update trigger, which fires when a Unity Catalog model gets a new version or has an alias assigned to it.
- A. The Model update trigger is the Jobs trigger type built specifically to react to Unity Catalog model events, including a new version becoming ready, which lets an evaluation job start right when that happens.
- B. A Continuous trigger reacts to the evaluation job's own prior run completing, not to registry events, so it would loop evaluations regardless of whether any new model version actually exists.
- C. Unity Catalog model metadata is not exposed as a queryable Delta table that a Table update trigger can watch, so this trigger type is not the mechanism used to react to registry changes.
- D. An hourly schedule introduces up to an hour of delay before evaluation starts and still runs even when no new version has appeared, which does not match the requirement to react immediately to a new version.
3.Starting retraining from a drift or performance alert
Triggered retraining means turning a monitoring signal into a job run. A profile on an inference table writes accuracy metrics and drift statistics into its metric tables, as covered in Model performance trends from an inference table. The retraining decision is a threshold on one of those metrics. For example, fire when accuracy for the current model id drops below the level the business accepts, or when baseline drift on a key feature goes past a set value. For InferenceLog analysis, a drift alert is meant to signal that the model should be retrained.
The wiring is a Databricks SQL query on the profile metrics or drift metrics table, plus a Databricks SQL alert on that query. You can see the alert mechanics in Drift alerts on monitor metric tables. To close the loop, the alert has to start a job as well as notify someone. The alert evaluates its query at the frequency you set. When the metric is anomalous, a webhook destination on the alert can call the training workflow, so a large shift in incoming data or a drop in model quality starts retraining and redeployment with little human involvement. Without the webhook, crossing the threshold only sends an email, which is enough when a data scientist must decide whether to develop a new model version.
One quiet failure is worth checking. If the alert's query uses parameters, the alert evaluates it with the parameters' default values. A query written for interactive use, with its default model id still pointing at an old version, will watch the wrong model. Confirm the defaults match the model and slice you actually want the alert to guard.
Checkpoint 7 of 9· Check yourself
Your drift-triggered retraining uses a SQL alert on a query against the drift metrics table. The query filters on a model_id parameter. That parameter's default value is still 1, left over from interactive analysis, but production now serves model version 4. When the alert runs, whose drift does it check?
An alert evaluates a parameterized query using the parameters' default values. A default left pointing at an old model id makes the alert watch the wrong model, so it may never fire for the model in production. Check that the defaults match the model and slice the alert should guard.
“If the query uses parameters, the alert is based on the default values for those parameters.”Source: docs.databricks.com
4.Narrowing retraining candidates to one run
A retraining run often produces many candidates, such as one run per hyperparameter trial. Only one should go on to registration and the Champion comparison. Two habits keep that narrowing cheap and stable. First, limit the search space in production: data scientists may test many algorithms and hyperparameters in development, but production training code usually considers only the top performers, often with the chosen hyperparameters in a configuration file. That saves compute, and it reduces the run-to-run variance that tuning brings into automated retraining.
Second, pick the winner from what you logged instead of from memory. Each candidate run logs its validation metric, as covered in Programmatic MLflow logging (params, metrics, tags, artifacts). mlflow.search_runs returns the runs as a DataFrame, order_by sorts them by that metric, and the first row is the best candidate. Adding a second sort key settles ties deterministically, so two runs with the same score don't produce a different winner each time the pipeline runs.
# Sort runs by their test auc. In case of ties, use the most recent run.
best_run = mlflow.search_runs(
order_by=['metrics.test_auc DESC', 'start_time DESC'],
max_results=10,
).iloc[0]Register only best_run, from its runs:/<run_id>/model URI, as a new version in the production catalog. Registering all twenty trials would start twenty validation and deployment runs and clutter the model with versions nobody intends to ship.
Checkpoint 8 of 9· Check yourself
During development, data scientists tried a dozen algorithms and wide hyperparameter grids. How should the production retraining pipeline's training code handle that search space?
Production training code usually considers only the top-performing options, often with the chosen hyperparameters in a configuration file. This saves compute and reduces run-to-run variance from tuning in automated retraining. Registering every trial would start a validation and deployment run for each version and clutter the model with versions nobody intends to ship.
“In the production training code, it's common to consider only the top-performing options.”Source: docs.databricks.com
Sources1
5.Champion vs Challenger: validate, compare, then promote
Validation decides whether a version is allowed to compete. It doesn't decide whether the version wins. The validation task loads the version by its URI and runs checks that depend on the organization: basic format and metadata, performance on selected data slices, and compliance requirements such as required tags or documentation. A version that passes everything gets the Challenger alias. A version that fails ends the process, users can be notified automatically, and a tag such as a validation status marks the outcome on the version.
Promotion comes from the comparison. The newly validated Challenger has to perform at least as well as the current Champion before it replaces it. You run the comparison on a fixed evaluation set so the two models are scored against the same data. When there is no Champion yet, as with a model's first release, compare the Challenger to a business heuristic or another threshold as a baseline.
| Comparison | How it runs | When it wins |
|---|---|---|
| Offline | Both models scored on the same held-out data set, with results tracked in MLflow Tracking | The default automated gate on every retrain; fast and repeatable |
| Online | A/B test or gradual rollout, using one Model Serving endpoint with a traffic split between the two models | Real-time serving where a small offline win should be confirmed on live traffic before the full alias switch |
The alias swap is the deployment. Inference pipelines load the model by its Champion alias, so once the alias moves to the new version, the next execution picks it up automatically, and the inference code never changes. For real-time serving, updating an endpoint to the new version is a zero-downtime update: Model Serving keeps the existing configuration running until the new one is ready. When manual approval is required, workflow notifications or CI/CD callbacks add that step to an otherwise automated process.
Registration also starts the deployment step for you. If the registered model has a deployment job connected, each new version created by a retraining run starts that job automatically, with model_name and model_version as its job parameters. That is how retraining hands off to evaluation, approval and rollout, as described in MLflow deployment job (evaluate, approve, deploy). Keep that job's max concurrent run limit at 1, the default, so that two quick retrains can't race each other into deployment.
Checkpoint 9 of 9· Check yourself
An automated retrain registers a new version that passes every validation check and gets the Challenger alias. On the fixed held-out evaluation set, it then scores slightly lower than the current Champion. What should the pipeline do next?
Passing validation only earns the Challenger alias. The Challenger replaces the Champion only if the comparison shows it performs at least as well as the current production model. Here it lost, so the Champion alias stays where it is and inference keeps using the current model.
“The first step before deploying the new model is to confirm that it performs at least as well as the current production model.”Source: docs.databricks.com
Sources
(7)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“This pipeline can be triggered by code changes or by automated retraining jobs.”
↩︎ The retraining loop and why it starts on a schedule“a multitask Databricks workflow in which the first task is the model training pipeline, followed by model validation and model deployment tasks”
↩︎ The retraining loop and why it starts on a schedule“You can use task values to pass this URI to the model.”
↩︎ The retraining loop and why it starts on a schedule“Databricks recommends beginning with scheduled, periodic retraining and moving to triggered retraining when needed.”
↩︎ The retraining loop and why it starts on a schedule“you can create a scheduled job to run the model training code on the latest available data”
↩︎ The retraining loop and why it starts on a schedule“This can be achieved through a SQL alert to check whether a metric is anomalous”
↩︎ Starting retraining from a drift or performance alert“The alert can be configured to use a webhook destination, which can subsequently trigger the training workflow.”
↩︎ Starting retraining from a drift or performance alert“In the production training code, it's common to consider only the top-performing options.”
↩︎ Narrowing retraining candidates to one run“Limiting tuning in this way saves time and can reduce the variance from tuning in automated retraining.”
↩︎ Narrowing retraining candidates to one run“If the model does not pass all validation checks, the process exits and users can be automatically notified.”
↩︎ Champion vs Challenger: validate, compare, then promote“The first step before deploying the new model is to confirm that it performs at least as well as the current production model.”
↩︎ Champion vs Challenger: validate, compare, then promote“An offline comparison evaluates both models against a held-out data set and tracks results using the MLflow Tracking server.”
↩︎ Champion vs Challenger: validate, compare, then promote“perform longer running online comparisons, such as A/B tests or a gradual rollout of the new model”
↩︎ Champion vs Challenger: validate, compare, then promote“to a business heuristic or other threshold as a baseline”
↩︎ Champion vs Challenger: validate, compare, then promote“the inference pipeline automatically uses the new version for its next execution.”
↩︎ Champion vs Challenger: validate, compare, then promote“This architecture supports automatic retraining using the same model training pipeline above.”
↩︎ Key concept“The alert can be configured to use a webhook destination, which can subsequently trigger the training workflow.”
↩︎ Exam trap 3“Databricks recommends beginning with scheduled, periodic retraining and moving to triggered retraining when needed.”
↩︎ Exam trap 4“The first step before deploying the new model is to confirm that it performs at least as well as the current production model.”
↩︎ Exam trap 5“you deploy a multitask Databricks workflow in which the first task is the model training pipeline, followed by model validation and model deployment tasks.”
↩︎ Checkpoint - 2.https://docs.databricks.com/aws/en/jobs/triggersOfficial docs
“Triggers a job run when new files arrive in a monitored Unity Catalog storage location.”
↩︎ Choosing a Lakeflow Jobs trigger“Triggers a job run when a Unity Catalog model is created, a model version is ready, or a model alias is set (Beta).”
↩︎ Choosing a Lakeflow Jobs trigger“Runs are skipped when they exceed the configured max concurrency for a job.”
↩︎ Choosing a Lakeflow Jobs trigger“To keep the job always running, trigger another job run whenever a job run completes or fails.”
↩︎ Exam trap 2 - 3.
“A table update trigger checks for table updates, and when a table is updated, the job is run.”
↩︎ Choosing a Lakeflow Jobs trigger“run a job when new data is ready without the need for a continuously running cluster”
↩︎ Choosing a Lakeflow Jobs trigger“If the Run as principal does not have SELECT on a monitored object, the trigger fails to evaluate and the job does not run.”
↩︎ Choosing a Lakeflow Jobs trigger - 4.
“This feature is useful when a scheduled job's efficiency is compromised by irregular new data arrivals.”
↩︎ Choosing a Lakeflow Jobs trigger“A file arrival trigger recursively checks for new files in all subdirectories of the configured location.”
↩︎ Choosing a Lakeflow Jobs trigger“monitor the root of a Unity Catalog external location or volume, or a subpath of an external location or volume”
↩︎ Exam trap 1 - 5.
“Model version is ready: A new model version becomes ready in the scope.”
↩︎ Choosing a Lakeflow Jobs trigger“This feature replaces the need for cron schedules or persistent clusters to track model updates.”
↩︎ Choosing a Lakeflow Jobs trigger - 6.
“for InferenceLog analysis, to indicate that the model should be retrained.”
↩︎ Starting retraining from a drift or performance alert“If the query uses parameters, the alert is based on the default values for those parameters.”
↩︎ Starting retraining from a drift or performance alert“By default, email notification is sent.”
↩︎ Prediction - 7.
“they trigger automatically whenever a new model version is created”
↩︎ Champion vs Challenger: validate, compare, then promote“Databricks also recommends setting the max concurrent run limit to 1 (the default) to prevent deployment race conditions.”
↩︎ Champion vs Challenger: validate, compare, then promote