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?
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:
When using the Hyperdrive feature in Azure ML, there are some specific conditions that your script must fulfill. The Hyperdrive feature helps to automate the process of tuning hyperparameters, which are parameters that are not learned during training but are set before training begins. The optimal hyperparameters are often critical to the performance of an ML model, so finding the best values for them is an important step in the machine learning process.
Here are the explanations for the four options provided:
A. Define ScriptConfig; create ScriptRunConfig This option is not specific to Hyperdrive experiments. ScriptConfig and ScriptRunConfig are components that are used to define the script that will be run during an experiment, and they can be used in both regular and Hyperdrive experiments.
B. Add script argument for hyperparameters; create an Estimator This option is partially correct. In a Hyperdrive experiment, you need to add a script argument for the hyperparameters you want to tune. This allows you to pass different values for the hyperparameters to the script during each run of the experiment. However, creating an Estimator is not specific to Hyperdrive experiments. An Estimator is a high-level object in Azure ML that encapsulates the training script and its dependencies, and it can be used in both regular and Hyperdrive experiments.
C. Add script argument for hyperparameters; Log primary metric This option is correct. In a Hyperdrive experiment, you need to add a script argument for the hyperparameters you want to tune, and you also need to log the primary metric that you want to optimize. The primary metric is the metric that you want to use to evaluate the performance of the model during the hyperparameter tuning process. Logging this metric allows Azure ML to keep track of the performance of each run of the experiment and select the hyperparameter values that result in the best performing model.
D. Define training dataset; validation dataset. This option is not specific to Hyperdrive experiments. Defining the training dataset and the validation dataset is a crucial step in the machine learning process, regardless of whether you are using Hyperdrive or not.
Therefore, the correct answer is C. Add script argument for hyperparameters; Log primary metric.