easyMultiple Choice
PMLE Practice Question: Refer to the exhibit
Exhibit
Refer to the exhibit.
training_job = aiplatform.CustomTrainingJob(
display_name='hyperparameter-job',
script_path='train.py',
container_uri='gcr.io/cloud-aiplatform/training/tf-cpu.2-6:latest',
requirements=['tensorflow==2.6'],
model_serving_container_image_uri='gcr.io/cloud-aiplatform/prediction/tf2-cpu.2-6:latest',
)
hp_job = training_job.run(
replica_count=1,
machine_type='n1-standard-4',
hyperparameter_tuning_job_spec={
'max_trial_count': 10,
'parallel_trial_count': 2,
'metrics': [{'metric_id': 'accuracy', 'goal': 'MAXIMIZE'}]
}
)Refer to the exhibit. A data scientist runs this Vertex AI training job code. What will be the outcome?
⚠ Common exam trap
Google Cloud often tests the misconception that `parallel_trial_count` must be equal to or greater than `max_trial_count`, when in reality it can be any value from 1 to `max_trial_count`, and sequential trials are perfectly valid.
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
✓
A HyperparameterTuningJob is created and runs trials.
The code uses `HyperparameterTuningJob` with `parallel_trial_count=1` and `max_trial_count=10`. This creates a hyperparameter tuning job that runs up to 10 trials, each trial being a separate training run with different hyperparameter values. The `parallel_trial_count=1` means trials run sequentially, not in parallel, but this is valid and does not cause failure.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The job runs as a regular custom training with 10 replicas.
Why it's wrong here
Hyperparameter tuning jobs with a defined parameter metric and search space run as tuning jobs, not custom training with replicas. It tempts because custom training does support replica counts, but the exhibit's tuning configuration overrides that interpretation.
- ✓
A HyperparameterTuningJob is created and runs trials.
Why this is correct
Passing a hyperparameter tuning configuration alongside the training script causes Vertex AI to launch a HyperparameterTuningJob rather than a single CustomJob. The service then runs multiple trials, each training with different hyperparameter values, and selects the best-performing trial.
- ✗
A CustomJob is created with hyperparameters from the spec.
Why it's wrong here
Submitting a training job with a custom training spec creates a CustomJob only when no hyperparameter tuning configuration is present; supplying a hyperparameter tuning spec causes a HyperparameterTuningJob instead. It is tempting because the spec resembles a plain custom job, but tuning parameters change the resource type created.
- ✗
The job fails because parallel_trial_count cannot be less than max_trial_count.
Why it's wrong here
Parallel trial count must be less than or equal to max trial count, not greater, so this constraint is satisfied and no failure occurs. It tempts because reversed limits genuinely trigger validation errors, but here the values comply, so the job proceeds normally.
Go deeper
Related to this question
About these practice questions
One of 775 original PMLE practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.