You must tune learning rate and batch size for a model, stop poorly performing trials early, and keep cost bounded. What do you configure?
- Exam domain
- Implement machine learning model lifecycle and operations25–30% of the exam
- Difficulty
- Medium
- In this mock
- 22 questions on this domainPractise this domain
Why the exam asks this
Implement machine learning model lifecycle and operations: Orchestrate model training.
Objective in the exam guide: Automate hyperparameter tuning.
Tuning by hand is slow and costly. The exam checks you know the sweep job settings.
Why D is the answer
A sweep job with a sampling algorithm, an early termination policy and limits
A sweep job runs trials over a search space, an early termination policy stops weak trials, and limits cap trials and time.
Remember: Hyperparameter tuning: sweep job with search space, sampling, early termination and limits.
How it works
A sweep job defines a search space for hyperparameters and a primary metric to optimize.
A sampling algorithm picks values: random, grid or Bayesian.
An early termination policy, such as bandit or median stopping, ends trials that fall behind, and limits cap total trials and run time.
Clues in the question
The words that point to the answer, and what each one tells you.
- Tune learning rate and batch size
- A search space.
- Stop poorly performing trials early
- Early termination policy.
- Cost bounded
- Trial and time limits.
In detail
- Sampling options include random, grid and Bayesian sampling.
- Early termination policies include bandit, median stopping and truncation selection.
Side by side with look-alikes
| Setting | Controls |
|---|---|
| Search space | Which values to try |
| Sampling algorithm | How values are picked |
| Early termination policy | Which trials stop early |
| Limits | Maximum trials and time |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. A single command job with the largest learning rateWrong
One trial explores nothing.
B. An AutoML job for a language modelWrongMost tempting
AutoML for language models is a different task, and the question asks to tune your own model.
Why it tempts: AutoML also tunes automatically, so it sounds like a match. But the question is about tuning your own training script's hyperparameters.
C. A batch endpoint with more instancesWrong
A batch endpoint scores data; it does not train.
D. A sweep job with a sampling algorithm, an early termination policy and limitsRight
Hyperparameter tuning: sweep job with search space, sampling, early termination and limits.
In practice
- Log the primary metric with MLflow under the exact name the sweep job optimizes.
Use case
An illustrative scenario, not a real incident.
A team runs 40 trials with Bayesian sampling; a median stopping policy ends half of them early, saving GPU hours.
See how it works
xychart-beta x-axis ["T1", "T2", "T3", "T4", "T5", "T6"] y-axis "Validation accuracy" 0 --> 1 bar [0.62, 0.81, 0.55, 0.84, 0.70, 0.49] line [0.66, 0.66, 0.66, 0.66, 0.66, 0.66]
How to read this chart
- Bars: each trial's validation accuracy at the evaluation point.
- Line: the median across trials, 0.66.
- With median stopping, trials below the line, T1, T3 and T6, are ended early, and their compute is freed for better trials.