MLOps & Deployment
Chapter: 5.3 MLOps & Deployment Level: 1 — Recognition (MCQ, Matching, True/False with justification) Time limit: 20 minutes Total marks: 40
Section A — Multiple Choice (1 mark each, 10 marks)
Select the single best answer.
Q1. Which tool is primarily used for data versioning in ML projects?
- (a) MLflow
- (b) DVC
- (c) FastAPI
- (d) Prometheus
Q2. A feature store primarily solves the problem of:
- (a) Serving REST endpoints
- (b) Training-serving skew by providing consistent features
- (c) Container orchestration
- (d) Model quantization
Q3. Which inference mode is best suited for low-latency, per-request predictions (e.g., fraud check at checkout)?
- (a) Batch inference
- (b) Real-time inference
- (c) Offline scoring
- (d) Scheduled cron jobs
Q4. Data drift refers to:
- (a) A change in the input feature distribution over time
- (b) A change in the relationship between inputs and target
- (c) Model weights being corrupted
- (d) Increased GPU memory usage
Q5. In Kubernetes, the smallest deployable unit that can run a container is a:
- (a) Node
- (b) Pod
- (c) Service
- (d) Ingress
Q6. ONNX is mainly used to:
- (a) Track experiments
- (b) Provide a portable model interchange format across frameworks
- (c) Balance network load
- (d) Store training data
Q7. Which framework is purpose-built for high-throughput LLM serving with paged attention?
- (a) TorchServe
- (b) vLLM
- (c) DVC
- (d) Grafana
Q8. In an A/B test for models, the control group receives:
- (a) The new candidate model
- (b) The existing (current) model
- (c) No model at all
- (d) A random output
Q9. A model registry is used to:
- (a) Store and manage model versions and lifecycle stages
- (b) Serve HTTP requests
- (c) Detect concept drift automatically
- (d) Compress model weights
Q10. Which technique most directly reduces inference latency and cost for large models?
- (a) Increasing batch epochs
- (b) Quantization (e.g., INT8)
- (c) Adding more training data
- (d) Using a larger learning rate
Section B — Matching (1 mark each, 10 marks)
Match each term in Column X to the best description in Column Y. Write pairs like M1 → (iv).
| Column X | Column Y |
|---|---|
| M1. MLflow | (i) Container packaging of app + dependencies |
| M2. Docker | (ii) Experiment tracking of params/metrics/artifacts |
| M3. Triton | (iii) Automates build/test/deploy of ML code & models |
| M4. CI/CD pipeline | (iv) Multi-framework model serving with dynamic batching |
| M5. Concept drift | (v) Change in P(y | x) relationship |
| M6. Feature store | (vi) Centralized, reusable feature repository |
| M7. Prometheus/Grafana | (vii) Monitoring metrics collection & dashboards |
| M8. Retraining pipeline | (viii) Refresh model on new data on trigger/schedule |
| M9. Kubernetes | (ix) Orchestrates and scales containerized workloads |
| M10. REST API (FastAPI) | (x) Exposes model predictions over HTTP endpoints |
Section C — True/False WITH Justification (2 marks each, 20 marks)
State True or False (1 mark) and give a one-line justification (1 mark).
Q11. Batch inference generally achieves higher throughput than real-time inference for the same hardware.
Q12. Setting a fixed random seed alone fully guarantees bit-for-bit reproducibility across different hardware and library versions.
Q13. Data drift and concept drift are the same phenomenon and are detected identically.
Q14. A Docker image and a running Docker container are the same thing.
Q15. The ML project lifecycle ends once the model is deployed to production.
Q16. In Kubernetes, a Horizontal Pod Autoscaler can scale the number of serving pods based on observed load metrics.
Q17. Canary deployment routes a small fraction of traffic to the new model before full rollout.
Q18. Model quantization always increases model accuracy.
Q19. DVC stores large data files inside the Git repository history the same way it stores source code.
Q20. Monitoring only model accuracy is sufficient observability for a production ML system.
Answer keyMark scheme & solutions
Section A (1 mark each)
Q1 → (b) DVC. DVC (Data Version Control) versions datasets/artifacts alongside Git. (1)
Q2 → (b). Feature stores centralize feature definitions so training and serving use identical computations, eliminating training-serving skew. (1)
Q3 → (b) Real-time inference. Per-request, low-latency needs synchronous online serving. (1)
Q4 → (a). Data drift = shift in input distribution P(x); (b) describes concept drift. (1)
Q5 → (b) Pod. A pod wraps one or more containers as the smallest schedulable K8s unit. (1)
Q6 → (b). ONNX is an open interchange format enabling cross-framework/portable deployment. (1)
Q7 → (b) vLLM. vLLM uses PagedAttention for high-throughput LLM serving. (1)
Q8 → (b). Control = current/existing model; treatment = new candidate. (1)
Q9 → (a). Registry manages versions and stage transitions (Staging/Production/Archived). (1)
Q10 → (b) Quantization. Lower-precision (INT8) shrinks memory/compute, cutting latency & cost. (1)
Section B (1 mark each)
- M1 → (ii)
- M2 → (i)
- M3 → (iv)
- M4 → (iii)
- M5 → (v)
- M6 → (vi)
- M7 → (vii)
- M8 → (viii)
- M9 → (ix)
- M10 → (x)
Award 1 mark per correct pair; 10 total.
Section C (2 marks each: 1 verdict + 1 justification)
Q11. TRUE. Batch amortizes overhead across many samples and exploits large-batch parallelism, raising throughput (at the cost of latency). (1+1)
Q12. FALSE. Seeds don't control non-determinism from GPU kernels, thread ordering, or library/version differences; full reproducibility also needs pinned environments and deterministic ops. (1+1)
Q13. FALSE. Data drift = change in P(x); concept drift = change in P(y|x). They differ and require different detection (input-distribution tests vs. performance/label-relationship monitoring). (1+1)
Q14. FALSE. An image is a static template; a container is a running instance of that image. (1+1)
Q15. FALSE. The lifecycle is iterative; deployment is followed by monitoring, drift detection, and retraining. (1+1)
Q16. TRUE. HPA adjusts pod replica count based on metrics like CPU/GPU/latency/custom metrics. (1+1)
Q17. TRUE. Canary sends a small traffic slice to the new version to limit blast radius before full rollout. (1+1)
Q18. FALSE. Quantization typically trades a small accuracy drop for speed/size; it does not guarantee accuracy gains. (1+1)
Q19. FALSE. DVC stores lightweight metadata pointers in Git and keeps large files in remote/cache storage, not in Git history. (1+1)
Q20. FALSE. Robust observability also needs latency, throughput, data/prediction drift, input validation, and system health — not accuracy alone. (1+1)
Total: 10 + 10 + 20 = 40 marks.
[
{"claim":"Section A has 10 one-mark MCQs summing to 10", "code":"marks=[1]*10; result=(sum(marks)==10)"},
{"claim":"Section B has 10 matching items at 1 mark each = 10", "code":"result=(10*1==10)"},
{"claim":"Section C has 10 True/False items at 2 marks each = 20", "code":"result=(10*2==20)"},
{"claim":"Total marks equal 40", "code":"result=(10+10+20==40)"},
{"claim":"Number of Section C verdicts marked TRUE equals 4 (Q11,Q16,Q17) plus checking count", "code":"true_qs=['Q11','Q16','Q17']; result=(len(true_qs)==3)"}
]