HOTSPOT
-
You manage an Azure Machine Learning workspace by using the Python SDK v2.
You must create an automated machine learning job to generate a classification model by using data files stored in Parquet format.
You must configure an autoscaling compute target and a data asset for the job.
You need to configure the resources for the job.
Which resource configuration should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: Compute target: Azure Databricks
Data asset: uri_folder
Explanation: Azure Databricks supports autoscaling clusters suitable for automated ML jobs. Parquet data stored as multiple files is best referenced as a folder-based data asset, allowing the job to read all Parquet files from the directory.
Question 140
You manage an Azure Machine Learning workspace. You have an environment for training jobs which uses an existing Docker image.
A new version of the Docker image is available.
You need to use the latest version of the Docker image for the environment configuration by using the Azure Machine Learning SDK v2.
What should you do?
A. Modify the conda_file to specify the new version of the Docker image.
B. Use the Environment class to create a new version of the environment.
C. Use the create_or_update method to change the tag of the image.
D. Change the description parameter of the environment configuration.
Show Answer
Correct Answer: B
Explanation: In Azure Machine Learning SDK v2, environment properties such as the base Docker image are immutable. To use a newer Docker image, you must create a new version of the environment using the Environment class and register it (via create_or_update). You cannot modify the image tag of an existing environment version; only description and tags are updatable.
Question 141
HOTSPOT
-
You manage an Azure Machine Learning workspace. You create an experiment named experiment by using the Azure Machine Learning Python SDK v2 and MLflow.
You are reviewing the results of experiment by using the following code segment:
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Show Answer
Correct Answer: Aborted runs are returned: No
The latest five experiment runs are returned: No
The jobs that are returned have been canceled or killed by the user or system: No
All metrics and their values are returned for the returned experiment runs: No
Explanation: The query orders runs by start_time ascending and limits to 5, so it returns the oldest runs, not the latest. Filtering with status == "FAILED" does not include aborted/canceled runs. Failed runs are not necessarily canceled or killed by user/system. search_runs does not automatically return all metrics unless explicitly accessed.
Question 142
You manage an Azure Machine Learning workspace named workspace1.
You must develop Python SDK v2 code to attach an Azure Synapse Spark pool as a compute target in workspace1. The code must invoke the constructor of the SynapseSparkCompute class.
You need to invoke the constructor.
What should you use?
A. Synapse workspace web URL and Spark pool name
B. resource ID of the Synapse Spark pool and a user-defined name
C. pool URL of the Synapse Spark pool and a system-assigned name
D. Synapse workspace name and workspace web URL
Show Answer
Correct Answer: B
Explanation: In Azure Machine Learning Python SDK v2, attaching an existing Azure Synapse Spark pool requires instantiating the SynapseSparkCompute class with two key parameters: a user-defined name for the compute target in the AML workspace, and the full Azure resource ID of the Synapse Spark pool. Other identifiers such as workspace URLs or pool URLs are not used by the constructor.
Question 143
You have an Azure Machine Learning workspace. You build a deep learning model.
You need to publish a GPU-enabled model as a web service.
Which two compute targets can you use? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
A. Azure Kubernetes Service (AKS)
B. Azure Container Instances (ACI)
C. Local web service
D. Azure Machine Learning compute clusters
Show Answer
Correct Answer: A, B
Explanation: GPU-enabled web services in Azure Machine Learning can be deployed to inference compute targets that support GPUs. Azure Kubernetes Service (AKS) supports GPU nodes and is the primary production-grade deployment target. Azure Container Instances (ACI) also supports GPU-backed containers for lightweight or test deployments. Azure ML compute clusters are for training/batch workloads, not web service deployment, and local web services are not suitable for GPU-enabled publishing.
Question 144
HOTSPOT
-
You are implementing hyperparameter tuning for a model training from a notebook. The notebook is in an Azure Machine Learning workspace. You add code that imports all relevant Python libraries.
You must configure Bayesian sampling over the search space for the num_hidden_layers and batch_size hyperparameters.
You need to complete the following Python code to configure Bayesian sampling.
Which code segments should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: choice
range
Explanation: For Bayesian sampling in Azure ML, discrete hyperparameters like batch_size with specific step values are defined using a choice over a generated range (e.g., range(16, 128, 16)). The learning rate already uses a supported continuous distribution.
Question 145
HOTSPOT
-
You have an Azure Machine Learning workspace.
You plan to use the Azure Machine Learning SDK for Python v1 to submit a job to run a training script.
You need to complete the script to ensure that it will execute the training script.
How should you complete the script? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: exp.submit
Explanation: In Azure ML SDK v1, training jobs are submitted from an Experiment object. The ScriptRunConfig is passed to Experiment.submit() to start the run.
Question 146
You register a model in an Azure Machine Learning workspace by running the following code:
You are creating a scoring script to use in a real-time service for the model.
You need to write code in the scoring script to set the path of the registered model so that it can be loaded by the service. You include the necessary import statements.
Which code segment should you use?
A. path = Model.get_model_path(‘loan_model’)
B. path = ‘model.pkl’
C. path = ws.models(‘loan_model’)
D. path = ‘outputs/model.pkl’
Show Answer
Correct Answer: A
Explanation: In an Azure Machine Learning real-time scoring script, the correct way to obtain the file system path of a registered model is to use Model.get_model_path('model_name'). This API resolves the model’s location in the deployed service environment. The other options either reference local filenames or workspace collections, which are not valid for loading a registered model at runtime.
Question 147
HOTSPOT
-
You create an Azure Machine Learning workspace. You train a classification model by using automated machine learning (automated ML) in Azure Machine Learning studio. The training data contains multiple classes that have significantly different numbers of samples.
You must use a metric type to avoid labeling negative samples as positive and an averaging method that will minimize the class imbalance.
You need to configure the metric type and the averaging method.
Which configurations should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Explanation: Precision minimizes false positives, which helps avoid labeling negative samples as positive. Macro averaging gives equal weight to each class, reducing the impact of class imbalance when classes have very different sample sizes.
Question 148
You are using a ScriptRunConfig object to configure an experiment that uses a script to train a machine learning model.
The script must apply a regularization rate hyperparameter to the algorithm that is used to train the model.
You need to pass the regularization rate in a variable named reg_rate to the script.
Which code segment should you use?
A.
B.
C.
D.
Show Answer
Correct Answer: B
Explanation: In Azure ML, hyperparameters are passed from ScriptRunConfig to the training script through the arguments parameter. Option B uses ScriptRunConfig with an arguments list that includes the command-line argument name (for example '--reg_rate') and its value, which allows the script to read the regularization rate into a variable named reg_rate using argparse.
$19
Get all 477 questions with detailed answers and explanations
Instant download HTML + PDF delivered the moment payment clears.
Secure Stripe checkout we never see or store your card details.
7-day refund if files are defective see our refund policy.