Docsity

MLOps and Model Deployment Practice Exam, Exams of Technology

Toggle sidebar
bg1
Production Challenge Practice Exam
**Question 1.** Which deployment model provides automatic scaling of compute resources without
managing servers?
A) On‑premise VM cluster
B) Serverless (e.g., AWS Lambda)
C) Bare‑metal Kubernetes
D) Docker Swarm
Answer: B
Explanation: Serverless platforms automatically provision and scale compute based on incoming request
volume, abstracting away server management.
**Question 2.** In a cloud‑based deployment, which service is primarily used to host a Docker
container for model serving?
A) Amazon S3
B) AWS SageMaker Endpoint
C) Amazon DynamoDB
D) Amazon CloudFront
Answer: B
Explanation: SageMaker Endpoints run Docker containers (or built‑in containers) that serve models and
handle scaling, monitoring, and security.
**Question 3.** Which of the following is a key advantage of edge‑device model deployment?
A) Unlimited compute resources
B) Zero latency for local inference
C) Centralized data storage
D) Automatic model versioning
Answer: B
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d

Partial preview of the text

Download MLOps and Model Deployment Practice Exam and more Exams Technology in PDF only on Docsity!

Question 1. Which deployment model provides automatic scaling of compute resources without managing servers? A) On‑premise VM cluster B) Serverless (e.g., AWS Lambda) C) Bare‑metal Kubernetes D) Docker Swarm Answer: B Explanation: Serverless platforms automatically provision and scale compute based on incoming request volume, abstracting away server management. Question 2. In a cloud‑based deployment, which service is primarily used to host a Docker container for model serving? A) Amazon S B) AWS SageMaker Endpoint C) Amazon DynamoDB D) Amazon CloudFront Answer: B Explanation: SageMaker Endpoints run Docker containers (or built‑in containers) that serve models and handle scaling, monitoring, and security. Question 3. Which of the following is a key advantage of edge‑device model deployment? A) Unlimited compute resources B) Zero latency for local inference C) Centralized data storage D) Automatic model versioning Answer: B

Explanation: Deploying models on edge devices eliminates network round‑trip time, providing near‑zero latency for inference. Question 4. What is the main difference between REST and gRPC for model invocation? A) REST uses binary payloads, gRPC uses JSON B) gRPC supports streaming and is based on protobuf, REST is text‑based HTTP/JSON C) REST requires Docker, gRPC does not D) gRPC cannot be used with TensorFlow Serving Answer: B Explanation: gRPC communicates via Protocol Buffers, enabling efficient binary serialization and streaming, while REST typically uses HTTP/JSON. Question 5. Which serving framework is designed to serve PyTorch models at scale with built‑in support for model versioning? A) TensorFlow Serving B) TorchServe C) Clipper D) ONNX Runtime Server Answer: B Explanation: TorchServe is the official PyTorch model serving library, offering multi‑model versioning, logging, and metrics. Question 6. Blue/Green deployment primarily aims to: A) Reduce model size by pruning B) Deploy two identical environments and switch traffic to the new one with minimal downtime C) Gradually roll out a model to a subset of users

C) The model runs only on test data D) The model is encrypted at rest only Answer: B Explanation: Shadow deployment sends live traffic to the new model in parallel with the production model, but its outputs are not exposed, allowing performance assessment without risk. Question 10. Which Dockerfile instruction is most effective for reducing final image size? A) RUN pip install - r requirements.txt B) COPY. /app C) FROM python:3.9-slim D) EXPOSE 8080 Answer: C Explanation: Using a minimal base image like python:3.9-slim reduces the overall image size compared to larger base images. Question 11. In Kubernetes, a Deployment object primarily manages: A) Persistent storage volumes B) The desired state of a set of Pods, including rollouts and scaling C) Network policies only D) Service discovery without pods Answer: B Explanation: Deployments define replica counts, update strategies, and ensure that the specified number of Pods are running. Question 12. Horizontal Pod Autoscaling (HPA) in Kubernetes typically uses which metric to scale model serving pods?

A) Disk I/O latency B) CPU utilization or custom metrics like request latency C. Number of Docker images in the registry D. Number of Kubernetes nodes Answer: B Explanation: HPA can scale pods based on CPU usage or custom metrics (e.g., request latency) to match inference demand. Question 13. Which CI/CD tool natively integrates with GitHub for building and deploying ML pipelines? A) Jenkins B) GitLab CI C) GitHub Actions D) Azure DevOps Pipelines Answer: C Explanation: GitHub Actions is built into GitHub, allowing workflows to be triggered on code pushes, PRs, and can run training, testing, and deployment steps. Question 14. A typical CI step for an ML project that ensures reproducibility is: A) Running a load test on the API endpoint B) Executing a unit test suite for data preprocessing functions C) Deploying the model to production without validation D) Deleting old Docker images Answer: B Explanation: Unit tests for data pipelines verify that preprocessing behaves as expected, a key part of reproducible ML pipelines.

Answer: A Explanation: DVC tracks data files via pointers in Git while storing the actual data in remote storage, enabling versioned datasets. Question 18. Scheduled model retraining based on performance degradation is an example of: A) Blue/Green deployment B) Continuous Integration only C) Automated model lifecycle management (MLOps) D) Manual model rollout Answer: C Explanation: Automatically retraining when performance drops implements a feedback loop, a core MLOps principle. Question 19. Quantization primarily reduces model size and inference latency by: A) Removing layers from the network B) Converting floating‑point weights to lower‑precision integers (e.g., INT8) C) Adding more neurons per layer D) Switching from CPU to GPU Answer: B Explanation: Quantization maps high‑precision weights to lower‑precision representations, decreasing memory footprint and speeding up arithmetic. Question 20. Knowledge distillation improves inference efficiency by: A) Training a smaller “student” model to mimic a larger “teacher” model’s outputs B) Pruning random neurons from the model C) Converting the model to a different programming language

D) Using a larger batch size during training only Answer: A Explanation: Distillation transfers knowledge from a high‑capacity model to a lightweight model, retaining performance while reducing resource needs. Question 21. Batching inference requests is most beneficial when: A) Each request requires unique GPU memory B) The model is stateless and can process multiple inputs simultaneously, improving throughput C) Latency must be under 1 ms for every request D) The model runs on a CPU only Answer: B Explanation: Batching aggregates multiple inputs into a single forward pass, leveraging parallelism and improving throughput at the cost of slight added latency. Question 22. Which hardware accelerator is specifically designed for tensor operations and is commonly used for serving deep learning models? A) FPGA B) TPU (Tensor Processing Unit) C) ASIC for Bitcoin mining D) Standard HDD Answer: B Explanation: TPUs are custom ASICs optimized for matrix multiplications and tensor operations, providing high throughput for deep learning inference. Question 23. In cloud environments, an API Gateway typically provides all EXCEPT: A) Request authentication and throttling

Question 26. Prometheus collects metrics using a pull model. Which component is responsible for exposing metrics from a model serving container? A) Grafana dashboard B) /metrics HTTP endpoint (e.g., via Prometheus client library) C) AWS CloudWatch agent D. Kubernetes Ingress controller Answer: B Explanation: Applications expose a /metrics endpoint; Prometheus scrapes this endpoint to collect data. Question 27. A sudden drop in precision on live data, while recall remains stable, suggests: A) Data drift affecting feature distribution B) Concept drift where the target relationship changed C) Hardware failure D) Increased network latency Answer: B Explanation: Concept drift changes the underlying mapping from inputs to target, often affecting specific metrics like precision, while data drift usually alters feature distributions. Question 28. In drift detection, a population stability index (PSI) is used to measure: A) Model training time B) Difference between two distributions of a feature (e.g., training vs. live) C) GPU temperature D) Number of API calls per second Answer: B Explanation: PSI quantifies shifts in feature distributions, helping detect data drift.

Question 29. Structured logging for inference requests typically includes all EXCEPT: A) Timestamp B) Model version identifier C) Raw source code of the model D) Input payload hash or identifier Answer: C Explanation: Structured logs capture request metadata, not the source code itself. Question 30. Tracing a prediction request end‑to‑end is best achieved with: A) Prometheus alone B) OpenTelemetry instrumentation across services C) Dockerfile LABEL statements D) Static code analysis tools Answer: B Explanation: OpenTelemetry provides distributed tracing that follows a request through multiple services, showing latency per component. Question 31. Feature stores help prevent training‑serving skew by: A) Storing raw data only B) Providing a single source of truth for feature transformations used both offline (training) and online (serving) C) Encrypting model weights D) Automatically scaling inference pods Answer: B

D. Docker image size limits Answer: B Explanation: RBAC defines which subjects (users, service accounts) can perform which API operations in the cluster. Question 35. To protect sensitive fields in inference request payloads (e.g., PII), a recommended practice is: A) Send them as plain text over HTTP B) Use TLS (HTTPS) for transport encryption and consider tokenization or hashing of PII before sending C) Store them in a public S3 bucket D. Disable all logging Answer: B Explanation: TLS encrypts data in transit, and tokenization/hashing reduces exposure of sensitive data even in logs. Question 36. LIME (Local Interpretable Model‑agnostic Explanations) generates explanations by: A) Training a global surrogate model B) Perturbing the input locally and fitting an interpretable model (e.g., linear) to approximate the original model’s behavior around that instance C. Using gradients of the neural network only D. Extracting decision trees from the model Answer: B Explanation: LIME creates a locally faithful linear approximation by sampling perturbed inputs and fitting a simple model. Question 37. SHAP values are based on which theoretical concept? A) Monte Carlo dropout

B) Game theory – Shapley values representing each feature’s contribution to the prediction C. Gradient descent D. Bayesian inference Answer: B Explanation: SHAP computes Shapley values, which allocate credit among features according to cooperative game theory. Question 38. Which fairness metric measures the difference in positive outcome rates between protected and unprotected groups? A) Accuracy B) Disparate Impact (or Statistical Parity Difference) C. ROC‑AUC D. Mean Squared Error Answer: B Explanation: Disparate impact quantifies how often each group receives a favorable prediction, highlighting potential bias. Question 39. A common technique to mitigate bias after deployment is: A) Removing the model from production B) Re‑weighting training samples to balance protected groups C. Increasing batch size during inference D. Disabling monitoring alerts Answer: B Explanation: Sample re‑weighting or adversarial debiasing can adjust the training process to reduce bias in predictions.

Explanation: Azure Monitor and Application Insights provide metrics, logs, and alerts for Azure ML endpoints. Question 43. When using TensorFlow Serving, the model is typically exported in which format? A) ONNX B) SavedModel directory structure C. PyTorch .pt file D. Pickle file Answer: B Explanation: TensorFlow Serving expects a SavedModel directory containing the protobuf graph and variables. Question 44. Which Kubernetes object abstracts a set of Pods and provides a stable network endpoint? A) ConfigMap B) Service C. PersistentVolumeClaim D. Secret Answer: B Explanation: A Service defines a stable IP/DNS name and load‑balances traffic across its backing Pods. Question 45. In a multi‑region deployment, the primary goal of using a global load balancer is to: A) Reduce model size B) Route user requests to the nearest healthy endpoint, minimizing latency and providing failover C. Encrypt model weights automatically

D. Disable autoscaling Answer: B Explanation: Global load balancers direct traffic based on geography and health, improving latency and resilience. Question 46. Which of the following best describes “feature drift”? A) Change in model architecture B) Shift in the statistical distribution of a feature between training and serving data C. Increase in GPU memory usage D. Change in API versioning Answer: B Explanation: Feature drift refers to changes in input feature distributions that can degrade model performance if not detected. Question 47. A typical method to version raw datasets in a production pipeline is: A) Storing them in a local folder without metadata B) Using DVC or lakehouse tables with timestamps and unique identifiers C. Overwriting the same file each day D. Compressing them into a single zip file without version control Answer: B Explanation: DVC tracks dataset versions with metadata, enabling reproducibility and linking specific data to model versions. Question 48. Which of the following is NOT a benefit of using a Feature Store? A) Centralized governance of feature definitions B) Automatic model hyperparameter tuning

A) SingleInputMessage B) PredictRequest with a repeated field for inputs C. HTTP GET query string D. JSON payload in body Answer: B Explanation: PredictRequest can contain a repeated field (e.g., inputs) allowing multiple instances to be sent in one RPC call. Question 52. Which of the following is a common reason to prefer Docker containers over bare‑metal VMs for model serving? A) Containers provide better hardware isolation than VMs B) Faster startup time, lower overhead, and easier packaging of dependencies C. Containers automatically improve model accuracy D. Containers eliminate the need for monitoring Answer: B Explanation: Containers share the host kernel, leading to quick spin‑up and lightweight packaging, ideal for serving. Question 53. In a Kubernetes cluster, which component is responsible for ensuring that the desired number of pod replicas are running? A) kube‑proxy B) kube‑controller‑manager (specifically the Deployment controller) C. kube‑scheduler only D. etcd Answer: B Explanation: The Deployment controller, part of kube‑controller‑manager, continuously reconciles the actual replica count with the desired state.

Question 54. What does “cold start latency” refer to in serverless model inference? A) Latency caused by high CPU usage B) The time required to initialize the function/container and load the model when the first request arrives after idle C. Network latency between regions D. Disk I/O latency due to logging Answer: B Explanation: Cold start occurs when a new instance must be provisioned and the model loaded, adding delay to the first request. Question 55. Which of the following is a best practice for minimizing Docker image size for model serving? A) Installing development tools (gcc, make) in the final image B) Using multi‑stage builds to copy only the runtime artifacts into a minimal base (e.g., python:slim) C. Adding the entire source repository into the image D. Using apt-get upgrade without cleaning caches Answer: B Explanation: Multi‑stage builds allow building in a heavyweight environment and copying only needed runtime files into a small image. Question 56. A “model card” is primarily used to: A) Store model weights securely B) Document model details, intended use, limitations, and ethical considerations for stakeholders C. Accelerate inference on GPUs D. Automate hyperparameter tuning