A trained model must be used by a batch scoring job tomorrow. What is the right approach?
- Exam domain
- Introductory MLOps Practices10% of the exam
- Difficulty
- Easy
- In this mock
- 5 questions on this domainPractise this domain
Why the exam asks this
Introductory MLOps Practices (10% of the exam)
Objective in the exam guide: Model saving, loading, and prediction generation
Saving, loading and predicting are named.
Why A is the answer
Save the model and its preprocessing together, then load both to predict
Saving the fitted preprocessing with the model ensures new data is transformed exactly as in training before prediction.
Remember: Save preprocessing with the model.
How it works
Model persistence saves the fitted model and preprocessing so predictions can be generated later.
In detail
- Save model plus preprocessing.
- Load and predict on new data.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Save the model and its preprocessing together, then load both to predictRight
Save preprocessing with the model.
B. Retrain the model from scratch inside the scoring jobWrong
Retraining each time is slow and inconsistent.
C. Copy the predictions from the training runWrong
Old predictions do not cover new data.
D. Save only the model, without preprocessingWrongMost tempting
Without preprocessing, inputs will not match.
Why it tempts: The model feels like the only artifact.
Use case
An illustrative scenario, not a real incident.
Illustrative: a saved pipeline scores 3 million new rows overnight.
See it in different ways
flowchart LR S0["Fit pipeline"] --> S1["Save pipeline"] --> S2["Load in job"] --> S3["Transform new data"] --> S4["Predict"]
How to read this chart
- Read it in order: Fit pipeline, then Save pipeline, then Load in job, then Transform new data, then Predict.
flowchart TD
Q{"Uses fitted transformers?"}
Q -->|"Yes"| A0["Save the whole pipeline"]
Q -->|"No"| A1["Save the model with its config"]How to read this chart
- At "Uses fitted transformers?": if "Yes", go to "Save the whole pipeline"; if "No", go to "Save the model with its config".