AI-300 Practice Question 44: Bayesian Sampling Early Termination
Microsoft Machine Learning Operations Engineer Associate (AI-300) · Test 5 · question 4 of 10
A team tunes a deep learning model on expensive GPU nodes. The search space includes the learning rate as a continuous log-scale range (loguniform), a dropout rate as a continuous range and a batch size chosen from a list. The team's submitted sweep job used Bayesian sampling with a bandit early termination policy, and the configuration cannot be used. The learning rate must stay a continuous search. They still want to search the continuous ranges and to stop poorly performing runs early to save GPU cost. Which change should they make?
Show answer and explanation
Answer:
In Azure Machine Learning sweep jobs, Bayesian sampling supports only the choice, uniform and quniform parameter expressions, so a loguniform learning rate cannot be used with it. The documentation lists early termination as a feature of random and grid sampling, but not of Bayesian sampling, so the bandit policy does not fit either. Random sampling *supports discrete and continuous hyperparameters, and supports early termination of low-performing jobs*, so it lets the team keep the continuous ranges and stop poor runs early (option C).
- A is wrong because turning the learning rate into a choice discards the continuous log-scale search the team requires for the learning rate, and Bayesian sampling is not documented as supporting early termination, so the GPU savings are still lost. - B is wrong because grid sampling works over discrete values only, so it cannot search the continuous learning rate and dropout ranges, and it tries every combination, which costs more. - D is wrong because a loguniform range is still not supported by Bayesian sampling, and removing the early termination policy gives up the GPU savings the team asked for.
Reference: Hyperparameter tuning a model (v2) - Azure Machine Learning