DP-100 practice question 6 of 35
You create a script that trains a convolutional neural network model over multiple epochs and logs the validation loss after each epoch. The script…
Full set: 506 questionsDomain Run experiments and train models
The user's goal is to find the optimal combination of batch size and learning rate for a custom training script by minimizing the validation loss. This process is known as hyperparameter tuning. Azure Machine Learning provides the HyperDrive service specifically for this task. A HyperDriveConfig object is used to configure the tuning experiment. It defines the script to run (via a ScriptRunConfig), the hyperparameter space to search, the sampling method, the primary metric to optimize (validation loss), and an optional early termination policy. HyperDrive then automates launching and managing multiple child runs to efficiently find the best hyperparameter combination based on the logged metric.
A. Run the script in an experiment based on an AutoMLConfig object Automated ML (AutoML) automatically selects and tunes algorithms from its own predefined set; it does not tune the hyperparameters of a user-provided custom script.
B. Create a PythonScriptStep object for the script and run it in a pipeline A PythonScriptStep is for executing a single script within a larger workflow. It does not provide the automated search and optimization capabilities required for hyperparameter tuning.
C. Use the Automated Machine Learning interface in Azure Machine Learning studio This is the user interface for AutoML (Option A). It is used for automated model selection and tuning, not for optimizing a custom user script.
D. Run the script in an experiment based on a ScriptRunConfig object A ScriptRunConfig is used to configure and submit a single training run. While it is a necessary component for a HyperDrive run, it cannot perform the tuning process on its own.
1. Microsoft Azure Official Documentation
"Tune hyperparameters for your model with Azure Machine Learning": This document explicitly states
"Automate efficient hyperparameter tuning by using Azure Machine Learning HyperDrive package." It details the required components for a HyperDrive run: a training script
a defined hyperparameter space
a primary metric to optimize
and a termination policy
which directly aligns with the user's scenario.
Source: Microsoft Learn
learn.microsoft.com/en-us/azure/machine-learning/how-to-tune-hyperparameters
Section: "What is hyperparameter tuning?".
2. Microsoft Azure Official Documentation
HyperDriveConfig class: The SDK reference for the HyperDriveConfig class shows that its constructor requires a run configuration (like ScriptRunConfig)
a hyperparametersampling object
and a primarymetricname. This confirms it is the specific object designed to configure a hyperparameter tuning experiment around a user's script.
Source: Microsoft Learn
learn.microsoft.com/en-us/python/api/azureml-train-hyperdrive/azureml.train.hyperdrive.hyperdriveconfig
Class constructor parameters.
3. Microsoft Azure Official Documentation
"What is automated machine learning (AutoML)?": This document clarifies that AutoML is for training and tuning models on a given dataset by iterating over algorithms and feature selections. It does not integrate and tune an external
user-defined training script.
Source: Microsoft Learn
learn.microsoft.com/en-us/azure/machine-learning/concept-automated-ml
Section: "When to use AutoML".
Keep practicing
Take the free DP-100 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DP-100 practice questions
- Question 2Note: This question is part of a series of questions that present the same scenario. Each…
- Question 5You have an Azure Machine Learning workspace. You plan to run a job to tram a model as an…
- Question 8You train and register an Azure Machine Learning model You plan to deploy the model to an…
- Question 11Note: This question is part of a series of questions that present the same scenario. Each…
- Question 14You use Azure Machine Learning to train a model based on a dataset named dataset1. You de…
- Question 18You use the designer to create a training pipeline for a classification model. The pipeli…
