PMLE Scaling Prototypes into ML Models Practice Question
A team is training a large recommendation model on Vertex AI using a custom container. They need to log training metrics and visualize them in Vertex AI TensorBoard. The training code is written in PyTorch and runs on multiple worker nodes. Which of the following is the correct way to enable TensorBoard logging?
⚠ Common exam trap
The trap here is assuming that any local logging will be automatically synced to Vertex AI TensorBoard, but explicit configuration of the TensorBoard instance is required.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use the Vertex AI SDK to create a TensorBoard instance and pass its resource name to the training job using the --tensorboard flag.
To integrate with Vertex AI TensorBoard, you must create a TensorBoard instance and pass its resource name to the training job. The training code should write logs to the directory specified by the AIP_TENSORBOARD_LOG_DIR environment variable. This allows Vertex AI to automatically collect and display metrics from all workers in the managed TensorBoard service.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Install TensorBoard in the custom container and run it as a sidecar process on each worker node.
Why it's wrong here
Running TensorBoard as a sidecar on each worker would require manual aggregation of logs and is not integrated with Vertex AI TensorBoard. Vertex AI provides a managed TensorBoard service that automatically collects logs from all workers when configured correctly. This approach adds unnecessary complexity and does not leverage the managed service.
- ✓
Use the Vertex AI SDK to create a TensorBoard instance and pass its resource name to the training job using the --tensorboard flag.
Why this is correct
The Vertex AI SDK allows creating a TensorBoard instance, and the training job can be configured with the tensorboard resource name. This enables automatic logging of metrics from the training container to the TensorBoard instance. The training code should write logs to the directory specified by the AIP_TENSORBOARD_LOG_DIR environment variable, which Vertex AI sets.
- ✗
Write training metrics to a Cloud Storage bucket and then manually upload them to Vertex AI TensorBoard after training.
Why it's wrong here
Manually uploading logs after training is inefficient and does not provide real-time visualization. Vertex AI TensorBoard supports streaming logs during training, which is essential for monitoring and debugging. This method also requires additional scripting and is error-prone.
- ✗
Use the torch.utils.tensorboard.SummaryWriter to write logs to a local directory, and Vertex AI will automatically sync it to TensorBoard.
Why it's wrong here
While using SummaryWriter is correct, Vertex AI does not automatically sync arbitrary local directories. You must specify the TensorBoard instance and ensure logs are written to the designated AIP_TENSORBOARD_LOG_DIR. Without that configuration, logs remain local to the container and are lost after the job completes.
Go deeper
Related to this question
About these practice questions
Courseiva writes every PMLE question from scratch — 775 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official Google Cloud exam blueprint
This PMLE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PMLE exam.