Designing and Implementing a Data Science Solution on Azure: Hyperdrive Experiment Components and Settings

Hyperdrive Experiment Components and Settings

Question

You are building an ML model, for which you want to find the optimal parameter setting which results in the best performing model.

You decide to use the hyperparameter-tuning feature of Azure ML, i.e.

use Hyperdrive in your experiments.

Using Hyperdrive requires some specific conditions your script must fulfil.

Which components/settings are specific only for Hyperdrive experiments?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer: C.

Option A is incorrect because ScriptConfig and ScriptRunConfig are common configuration objects used for any ML experiment.

They are not specific for Hyperdrive experiments.

Option B is incorrect because adding a script argument for hyperparameters to be adjusted is specific for Hyperdrive indeed, estimators are commonly used in any experiment, as “wrappers” for ScriptConfig and ScriptRunConfig.

Option C is CORRECT because if you want to tune model parameters using Hyperdrive, you must include a script argument for each parameter to be adjusted, as well as the primary performance metric (e.g.

Accuracy) must be logged, so that Hyperdrive can evaluate the runs and it can select the best performer combination.

Option D is incorrect because training and test/validation datasets are fundamental components of any ML experiment.

Reference:

Hyperparameter tuning is a process of finding the optimal values for the model's hyperparameters, which cannot be learned from the data during the training process. The Azure Machine Learning service provides Hyperdrive, a built-in hyperparameter tuning engine that helps data scientists to automatically explore the hyperparameter space and identify the optimal set of hyperparameters for their model.

When using Hyperdrive in Azure ML experiments, there are some specific conditions that must be fulfilled in the script:

Option A: Define ScriptConfig; create ScriptRunConfig The ScriptConfig specifies the entry script and the environment to use for running the script. The ScriptRunConfig creates a configuration object for running the script as an experiment in the Azure Machine Learning workspace.

Option B: Add script argument for hyperparameters; create an Estimator The script argument for hyperparameters is used to specify the range and values for the hyperparameters to be tuned. The Estimator is used to define the model training and evaluation steps.

Option C: Add script argument for hyperparameters; Log primary metric The script argument for hyperparameters is used to specify the range and values for the hyperparameters to be tuned. The primary metric is the metric used to evaluate the performance of the model. It must be logged during the training process so that Hyperdrive can use it to identify the best performing model.

Option D: Define training dataset; validation dataset The training and validation datasets are required for model training and evaluation. They must be defined in the script and used for training the model. However, this is not specific to Hyperdrive experiments and is required for all machine learning experiments.

Therefore, the correct answer is Option B: Add script argument for hyperparameters; create an Estimator, and Option C: Add script argument for hyperparameters; Log primary metric. These two conditions are specific to Hyperdrive experiments and are required to explore the hyperparameter space and identify the optimal set of hyperparameters for the model.