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.
Your ML team runs a weekly batch inference job over 500,000 Cloud Storage documents using a multi-host LLM served with vLLM on GKE. The job tolerates a 24-hour completion window and requires:
activeDeadlineSeconds timeouts.Which configuration should you implement?
Job manifests with parallelism enabled and completionMode: NonIndexed on GPU nodes reserved via Dynamic Workload Scheduler (DWS) Calendar mode, running a single container per Pod that sequentially downloads objects, preprocesses inputs, and calls vLLM synchronously.This option relies on standard Kubernetes Job controllers in NonIndexed mode running on long-term Dynamic Workload Scheduler (DWS) Calendar mode GPU reservations, with each Pod executing a monolithic single-container loop that fetches data, preprocesses it, and runs inference sequentially.
Job controllers do not guarantee that all Pods in a multi-host inference workload start simultaneously. Partial scheduling can cause distributed workers to hang in deadlocks while holding expensive accelerators idle, whereas JobSet provides gang scheduling and exclusive topology placement.completionMode: NonIndexed does not inject JOB_COMPLETION_INDEX into Pods, forcing workers either to rely on an external task queue or to risk duplicate work across replicas.activeDeadlineSeconds-aware batch sizing, long sequential Jobs risk losing all progress upon interruption or timeout.Reserving hardware with DWS Calendar mode would be appropriate for mission-critical, multi-month training or uninterrupted continuous serving of high-demand accelerators where Spot preemption cannot be tolerated, rather than a weekly, interruption-tolerant batch inference workload.
gcloud ai endpoints deploy-model, and run an Apache Beam RunInference pipeline on Dataflow with VertexAIModelHandlerJSON sending large batched JSON payloads from Cloud Storage.This option combines an online Agent Platform (Vertex AI) Endpoint configured for multi-host GPU serving with an Apache Beam pipeline on Dataflow using the RunInference transform and VertexAIModelHandlerJSON. In this setup, Dataflow workers read documents from Cloud Storage and send remote HTTP prediction calls to the managed online endpoint.
VertexAIModelHandlerJSON and introduce cross-service network latency, reducing throughput compared to co-located localhost streaming against a local vLLM server.min_replica_count and multi-host GPU node count.Using Apache Beam RunInference with VertexAIModelHandlerJSON would be appropriate when integrating inference directly into an existing streaming or ETL Dataflow pipeline that already calls a shared online endpoint—provided payloads remain under 1.5 MB or a private VPC endpoint is configured.
JobSet with gang scheduling on Spot VMs, configure ReplicatedJob with completionMode: Indexed so each Pod shards objects via JOB_COMPLETION_INDEX and writes checkpoints, pair each vLLM container with an asynchronous localhost prefetching sidecar driver, and size each Pod's workload batch between max_num_seqs and the activeDeadlineSeconds budget.This architecture uses the Kubernetes JobSet API on GKE combined with Spot VMs, Indexed Jobs, the sidecar pattern, and calibrated workload and request batch sizing. Together, these components form a purpose-built, high-throughput, cost-optimized distributed batch inference platform for large multi-host models.
completionMode: Indexed on the ReplicatedJob automatically injects JOB_COMPLETION_INDEX into every Pod. With parallelism set across the 500,000 Cloud Storage objects, each Pod computes its exact non-overlapping object range without needing an external task queue.localhost decouples network I/O and preprocessing from GPU/TPU execution, keeping the request queue saturated. Sizing each Pod's workload batch size to be at least max_num_seqs avoids accelerator underutilization, while capping it below the activeDeadlineSeconds execution window (minus startup overhead) prevents premature GKE Job termination.max_num_seqs and max_num_batched_tokens maximizes GPU utilization without triggering Out-Of-Memory (OOM) errors.Unlike continuous online endpoints, async Pub/Sub services, or uncoordinated standard Kubernetes Jobs, combining JobSet, Indexed sharding, Spot VMs with checkpointing, and localhost sidecar saturation directly solves multi-node deadlocks, I/O bottlenecks, and cost minimization in a single cohesive Kubernetes-native pattern.
num_undelivered_messages that forwards one message per inference request, and autoscale the vLLM Deployment using standard CPU and memory metrics.This approach implements an asynchronous (near-real-time) inference pattern on GKE using Pub/Sub as a durable message buffer, a HorizontalPodAutoscaler (HPA) on the subscriber tier, and an always-on vLLM Deployment behind GKE Inference Gateway. While Pub/Sub buffering works well for continuous, bursty streams requiring seconds-to-minutes latency, several specific configuration choices here undermine both throughput and cost efficiency for a weekly episodic batch workload.
max_messages as a multiple of the server's max_num_seqs setting.vllm:num_requests_waiting.num_undelivered_messages can overwhelm GPU/TPU quotas and trigger 429 or 503 errors without exponential backoff and acknowledgment deadline extensions.This pattern—once corrected to aggregate max_messages into multiples of max_num_seqs, cap subscriber maxReplicas, extend ack deadlines, and scale vLLM on vllm:num_requests_waiting—would be appropriate for bursty, near-real-time workloads such as streaming sentiment analysis or minute-by-minute recommendation updates.
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