Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Machine Learning Engineer practice bank has an additional 974 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
A personalization platform needs to deploy a two-stage GPU inference pipeline on Vertex AI (us-central1) with strict p99 latency (< 25 ms) and high-throughput targets:
Your serving architecture must satisfy these requirements:
Which containerization and model-serving architecture should you implement?
xx.yy-py3) as your base image, copy both the TorchScript and XGBoost model artifacts directly into the container image to avoid Cloud Storage access, and start Triton with --strict-model-config=false so it automatically generates the FIL and ensemble configurations at startup. Push the image to a multi-regional us-docker.pkg.dev Artifact Registry repository and supply both the version tag and SHA-256 digest in containerSpec.imageUri.The xx.yy-py3 image is NVIDIA's all-in-one Triton distribution bundling runtimes for TensorFlow, PyTorch, TensorRT, ONNX, OpenVINO, and FIL, while --strict-model-config=false enables Triton's automatic configuration derivation for select self-describing model formats.
config.pbtxt when --strict-model-config=false is used for TensorRT, TensorFlow SavedModel, and ONNX models. PyTorch TorchScript, XGBoost (FIL), and ensemble pipelines require explicit config.pbtxt definitions and will fail to load without them.xx.yy-py3 base image and embedding 2.2 GB of model artifacts directly into container layers creates a massive image that increases Artifact Registry storage costs, slows down container image pulls during autoscaling, and forces full image rebuilds for every model update.us-central1-docker.pkg.dev), not a multi-regional repository. Additionally, Vertex AI explicitly rejects containerSpec.imageUri values that combine both a tag and a digest (IMAGE:TAG@sha256:DIGEST).xx.yy-py3 includes gigabytes of unused framework libraries (TensorFlow, OpenVINO, TensorRT) that lengthen cold starts.:TAG or @sha256:DIGEST, never both.You were serving a single TensorFlow SavedModel or ONNX model for rapid prototyping, omitted the ensemble and XGBoost requirements, used a regional Artifact Registry repository, and specified only a tag or digest.
LocalModel.build_cpr_model() with a custom Predictor and Handler class, listing torch and xgboost in requirements.txt and loading both models sequentially inside Predictor.load(). Deploy the resulting image to a Vertex AI Endpoint with an L4 GPU and scale Uvicorn worker processes to handle concurrent requests.Custom Prediction Routines (CPR) in the Vertex AI SDK allow engineers to package custom preprocessing, prediction, and postprocessing logic by implementing Python Predictor and optional Handler interfaces. LocalModel.build_cpr_model() automatically generates a FastAPI/Uvicorn-based serving container without requiring you to write a Dockerfile or HTTP server boilerplate.
Dockerfile using a generic Python base image and requirements.txt, you lose fine-grained control over multi-stage layer optimization, CUDA/cuDNN dependency pinning, and minimal runtime image composition.deploy_to_local_endpoint) and custom Python pre/post-processing rather than ultra-low-latency multi-model GPU inference.Predictor.predict() incurs Python serialization and data-marshaling overhead on every request.You were deploying a lightweight CPU-bound scikit-learn or XGBoost pipeline that needed custom JSON/CSV deserialization and external feature lookups, without strict sub-25 ms GPU dynamic batching SLAs.
Dockerfile using pytorch/torchserve where stage 1 clones both models from an external repository, stage 2 runs torch-model-archiver to package the TorchScript weights, XGBoost model.bst, and a custom Python handler.py into a single model.mar file, and stage 3 copies only model-store/ and config.properties into the final image. Deploy the image using the Vertex AI prebuilt PyTorch prediction container configuration.TorchServe is a model-serving framework designed primarily for PyTorch models, packaging weights, custom pre/post-processing scripts (handler.py), and dependencies into a .mar (Model Archive) file via torch-model-archiver. Using a multi-stage Dockerfile that copies only model-store/ and config.properties into the final runtime image is an effective pattern for keeping TorchServe container images compact.
model.bst inside a PyTorch handler.py forces the second-stage inference through Python worker threads without NVIDIA's CUDA-accelerated FIL backend or Triton's native C++ ensemble scheduler. This introduces Python Global Interpreter Lock (GIL) contention, extra tensor-to-NumPy/DMatrix memory copies, and degraded p99 latency under high throughput.Dockerfile using a prebuilt PyTorch prediction container configuration—custom Dockerfile builds must be uploaded as custom containers with explicit HTTP/health routes (AIP_HTTP_PORT, /ping, /predictions/model). Prebuilt PyTorch containers expect only a model.mar artifact in Cloud Storage.model.mar (--model-name model)..mar files can trigger slow or failing installs at pod startup.You were serving a standalone PyTorch model (such as a T5 transformer) without an XGBoost stage, deployed your custom multi-stage image as a custom container (or GKE Deployment) rather than a prebuilt container.
xx.yy-py3-min), adding only the PyTorch, FIL (Forest Inference Library), and Python backends while stripping package caches (--no-cache-dir, removing /var/lib/apt/lists/*). Configure a Triton model repository with explicit config.pbtxt files for the TorchScript model, the XGBoost FIL model, and a Triton ensemble pipeline with dynamic_batching enabled. Stage the model repository in a us-central1 Cloud Storage bucket, push the image to a us-central1 Artifact Registry repository referenced by tag or digest (not both), and deploy to a Vertex AI Endpoint with L4 GPUs.NVIDIA Triton Inference Server provides a C++/CUDA-based serving runtime capable of executing heterogeneous deep learning and classical ML frameworks concurrently on GPUs. Starting from the xx.yy-py3-min minimal base image lets you compose a lean production container containing only the exact serving backends required—specifically PyTorch (for TorchScript) and FIL (Forest Inference Library) (for GPU-accelerated XGBoost)—rather than shipping unused TensorFlow, TensorRT, or OpenVINO runtimes.
dynamic_batching in config.pbtxt groups incoming concurrent requests on the server side to maximize L4 GPU utilization.xx.yy-py3-min and removing pip and apt caches drastically reduces image pull time. Keeping the 2.2 GB of model artifacts decoupled in a regional Cloud Storage bucket avoids baking large static layers into the Docker image and streamlines model updates.config.pbtxt files are mandatory for TorchScript, FIL, and ensemble models because auto-configuration does not support them. Storing the container in a regional Artifact Registry repository (us-central1-docker.pkg.dev) matching the endpoint region and specifying either a tag or a SHA-256 digest satisfies Vertex AI deployment rules./v2/health/ready) and inference routes.Unlike Python web servers or TorchServe, a custom-composed Triton xx.yy-py3-min container provides hardware-accelerated multi-framework pipelining, server-side dynamic batching, and the smallest possible container footprint for low-latency GPU serving.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated