Production data can only be read in the prod workspace, and retraining is cheap. Which promotion approach fits?
- Exam domain
- Databricks Machine Learning36% of the exam
- Difficulty
- Hard
- In this mock
- 18 questions on this domainPractise this domain
Why the exam asks this
Databricks Machine Learning (36% of the exam)
Objective in the exam guide: Identify scenarios where promoting code is preferred over promoting models and vice versa
Promoting code versus models is named.
Why C is the answer
Deploy code: promote the training code and retrain in prod on prod data
When prod data is only reachable in prod and training is cheap, promoting code and retraining there is the usual choice. Deploy model fits when training is expensive or one-off.
Remember: Deploy code when data and training allow.
How it works
The deploy-code pattern retrains in each environment.
In detail
- Deploy code: retrain per environment.
- Deploy model: train once, promote artifact.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Deploy model: train once in dev on dev data and copy the artifact up to prodWrongMost tempting
Dev cannot see prod data, so the model would be trained on the wrong data.
Why it tempts: Moving the artifact feels simpler.
B. Deploy nothing; score in devWrong
Scoring in dev breaks environment separation.
C. Deploy code: promote the training code and retrain in prod on prod dataRight
Deploy code when data and training allow.
D. Email the model file to the prod teamWrong
Email is not a promotion process.
Use case
An illustrative scenario, not a real incident.
Illustrative: a demand model's training code moves dev to prod through Git and retrains nightly in prod.
See it in different ways
flowchart TD
Q{"What constrains you?"}
Q -->|"Prod data only in prod, cheap training"| A0["Deploy code"]
Q -->|"Huge one-off training cost"| A1["Deploy model"]How to read this chart
- At "What constrains you?": if "Prod data only in prod, cheap training", go to "Deploy code"; if "Huge one-off training cost", go to "Deploy model".
sequenceDiagram participant P0 as Dev participant P1 as Git participant P2 as Prod job P0->>P1: merge training code P1->>P2: deploy code P2->>P2: retrain on prod data
How to read this chart
- 1. Dev sends "merge training code" to Git.
- 2. Git sends "deploy code" to Prod job.
- 3. Prod job sends "retrain on prod data" to Prod job.