MLOps and Cloud Automation
Lesson opener
In one line: A model is promotable when a pipeline can rebuild it from a named input and a second person can see the metric. A drift alert is a comparison you defined, not a feeling that the model "got worse."
Why it matters: Northline's scoring image was built on a laptop and copied to the registry by hand. The curated file changed. The endpoint still serves version 3, and nobody measured whether today's SKUs look like the training rows. Figures are illustrative. The drift cutoff below is Northline's choice, not a service default.
Before this lesson: You can name a registered model, a pinned image, and a curated path.
What you will be able to do
- Say what a build pipeline must record before it promotes a model.
- Use a model registry as the list of versions, not a folder of notebooks.
- Describe a feature as a named input with an owner.
- Fire a drift check only against a baseline and a cutoff you wrote down.
Prerequisites
Lessons 6 to 8. You will not stand up a registry in the practice.
Promote, then watch
A pipeline here is the automation that trains or builds from committed code and a named data asset, then pushes an image or registers a model. GitHub Actions can be that pipeline. Azure Pipelines can be that pipeline. The tool is not the control. The control is: the run names the data path, the code revision, the metric, and the image digest.
The model registry in Azure Machine Learning stores versions of a model (https://learn.microsoft.com/en-us/azure/machine-learning/concept-model-management-and-deployment). Promotion means a person or a rule moves a version to the endpoint. It does not mean the newest training job overwrites production by itself.
A feature is an input the model expects, such as units_on_hand at a known as_of. A feature store is a place that defines and serves those inputs so training and scoring use the same definition. Azure Machine Learning documents a managed feature store for that job (https://learn.microsoft.com/en-us/azure/machine-learning/concept-what-is-managed-feature-store). You do not need one on day one. You do need a written definition if two jobs compute "on hand" differently.
Data drift means the inputs now differ from the training inputs in a way you measure. Azure Machine Learning's model monitoring is the product surface for watching a deployed model (https://learn.microsoft.com/en-us/azure/machine-learning/concept-model-monitoring). A share of blank SKUs is a check you can run even before that product is wired. The cutoff is yours.
def drift_blank_sku(blank_rows, total_rows, cutoff):
if total_rows <= 0:
raise ValueError("no rows")
if not 0 <= cutoff <= 1:
raise ValueError("cutoff must be a share")
share = blank_rows / total_rows
return share > cutoff
assert drift_blank_sku(1, 100, 0.05) is False
assert drift_blank_sku(10, 100, 0.05) is True0.05 means "more than 5 blank SKUs per 100 rows." Northline picked it for this exercise. It is not a law and not an Azure default.
Teacher walkthrough: version 4 does not auto-replace version 3
All figures are illustrative.
- The pipeline reads
curated/stock/2026-09-30/, revisionc12ab, and records metric 0.90 against floor 0.80. - It registers model version 4 and pushes image digest
sha256:defwith tag2026-09-30.4. - The endpoint stays on version 3 until a person promotes version 4.
- Validation: the registry shows both versions. The endpoint's digest is still version 3's digest. A blank-SKU share of 0.02 does not page anyone. A share of 0.10 does.
A second workplace case
Training computes on-hand as the warehouse count. Scoring computes on-hand as the webshop's copy. The model "drifts" every Monday because the inputs are different facts. The fix is one feature definition, not a new algorithm. A feature store helps when many jobs need that definition. A written column name and source helps even without the product.
Failure example: the laptop that was production
Symptom: The endpoint returns scores. The registry has no version that matches the running digest. The only build log is a terminal on one laptop, which was reimaged.
Diagnosis: There is no pipeline record. The image was pushed by hand. The root cause is an unrepeatable build, not a bad metric.
Correction: Rebuild from the committed code and the curated path. Register the model. Deploy the new digest on purpose. Retire the untracked image.
Validation: A second person can point at the run and see the data path, the code revision, the metric, and the digest. The laptop is not in that list.
Guided practice: promote or hold
Scenario: Version 5's metric is 0.77. The floor is 0.80. The blank-SKU share today is 0.08. The cutoff is 0.05. The endpoint runs version 3. Figures are illustrative.
Hints:
- Which gate fails for version 5?
- What does the blank-SKU share say about today's inputs?
- What stays on the endpoint?
Complete solution:
Do not promote version 5. The metric is below the floor. The blank-SKU share is above the cutoff, so page the data owner about today's file. That alert does not by itself roll the endpoint back, and it does not prove the model weights changed. The endpoint stays on version 3 until a version passes the floor and a person promotes it. Record the shares so the alert is recomputable.
Independent practice
Write the promotion rule for one model.
Acceptance criteria:
- You name the data path, the code revision, and the metric the pipeline must store.
- You name the floor and mark it as your choice.
- You say production does not move until promotion.
- You name one drift measure, a baseline, and a cutoff you chose.
- You say a feature used at scoring must match the feature used at training.
Common mistakes
- The newest job overwrites the endpoint.
- A drift product with no baseline, so every day looks "different."
- Two definitions of on-hand quantity.
- Calling a laptop push a deployment pipeline.
Quick check
- What must a promotion pipeline record?
- Does registering version 4 replace the endpoint?
- What is a feature in this lesson?
- Who chooses the blank-SKU cutoff?
- What does a drift alert prove by itself?
Answers:
- The data path, the code revision, the metric, and the image digest or model version.
- No. Promotion is a separate step.
- A named input, with one definition for training and scoring.
- Northline, or your team. It is not an Azure default in this lesson.
- That the measured input share crossed a cutoff you set. It does not by itself change the endpoint.
Quiz alignment
The quiz asks you to record a build, to hold promotion, and to treat drift as a comparison against a cutoff you wrote down.
Lesson summary
Automate the build so a second person can see the inputs and the digest. Register models. Promote on purpose. Watch inputs with a measure and a cutoff. A feature must mean the same thing when you train and when you score.
Bridge to the next lesson
The next lesson calls prebuilt AI tools and Copilot without putting a key in a prompt, and without letting a draft write the ERP.