nerdexam
Microsoft

DP-100 · Question #339

You are implementing hyperparameter tuning by using Bayesian sampling for an Azure ML Python SDK v2-based model training from a notebook. The notebook is in an Azure Machine Learning workspace. The no

The correct answer is D. Set the value of max_concurrent_trials to 4.. Reducing max_concurrent_trials to 4 allows Bayesian sampling to learn from completed trial results before launching new ones, improving convergence.

Explore data and run experiments

Question

You are implementing hyperparameter tuning by using Bayesian sampling for an Azure ML Python SDK v2-based model training from a notebook. The notebook is in an Azure Machine Learning workspace. The notebook uses a training script that runs on a compute cluster with 20 nodes. The code implements Bandit termination policy with slack_factor set to 0.2 and a sweep job with max_concurrent_trials set to 10. You must increase effectiveness of the tuning process by improving sampling convergence. You need to select which sampling convergence to use. What should you select?

Options

  • ASet the value of max_concurrent_trials to 20.
  • BSet the value of slack_factor of early_termination policy to 0.1.
  • CSet the value of slack_factor of early_termination policy to 0.9.
  • DSet the value of max_concurrent_trials to 4.

How the community answered

(58 responses)
  • A
    33% (19)
  • B
    16% (9)
  • C
    9% (5)
  • D
    43% (25)

Why each option

Reducing max_concurrent_trials to 4 allows Bayesian sampling to learn from completed trial results before launching new ones, improving convergence.

ASet the value of max_concurrent_trials to 20.

Setting max_concurrent_trials to 20 maximizes parallelism but defeats Bayesian optimization because nearly all trials start before any results are available, effectively reducing the search to random sampling.

BSet the value of slack_factor of early_termination policy to 0.1.

Tightening the Bandit policy slack_factor from 0.2 to 0.1 terminates more underperforming trials earlier but does not change how Bayesian sampling selects new configurations or improve its convergence quality.

CSet the value of slack_factor of early_termination policy to 0.9.

Setting slack_factor to 0.9 makes the Bandit termination policy extremely lenient, wasting compute on poor-performing trials and reducing overall tuning efficiency without benefiting Bayesian convergence.

DSet the value of max_concurrent_trials to 4.Correct

Bayesian sampling works by using outcomes from previously completed trials to select the next hyperparameter configuration, so running fewer trials concurrently gives the algorithm more information per selection decision. With max_concurrent_trials set to 4 instead of 10, a greater proportion of trials complete before new ones are queued, which increases the quality of each selection and accelerates convergence. This is the recommended practice - keeping concurrency low relative to the total trial count maximizes the benefit of Bayesian optimization.

Concept tested: Bayesian hyperparameter sampling convergence with concurrent trials

Source: https://learn.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters

Topics

#Hyperparameter Tuning#Bayesian Sampling#Azure ML Sweep Job#Convergence Optimization

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice