Microsoft

DP-100 Free Practice Questions — Page 10

Question 97

HOTSPOT - You create a new Azure Machine Learning workspace with a compute cluster. You need to create the compute cluster asynchronously by using the Azure Machine Learning Python SDK v2. How should you complete the code segment? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 97
Show Answer
Correct Answer: AmlCompute ml_client.begin_create_or_update
Explanation:
In Azure ML Python SDK v2, a compute cluster is defined using AmlCompute. To create it asynchronously, the MLClient method begin_create_or_update() is used, which returns a long-running operation poller.

Question 98

HOTSPOT - You manage an Azure Machine Learning workspace by using the Python SDK v2. You must create a compute cluster in the workspace. The compute cluster must run workloads and property handle interruptions. You start by calculating the maximum amount of compute resources required by the workloads and size the cluster to match the calculations. The cluster definition includes the following properties and values: • names=“mlcluster” • size=“STANDARD_DS3_v2” • min_instances=1 • max_instances=4 • tier=“dedicated“ The cost of the compute resources must be minimized when a workload is active or idle. Cluster property changes must not affect the maximum amount of compute resources available to the workloads run on the cluster. You need to modify the cluster properties to minimize the cost of compute resources. Which properties should you modify? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 98
Show Answer
Correct Answer: active: tier idle: min_instances
Explanation:
To reduce cost without reducing maximum capacity, switch the cluster tier to low_priority during active workloads. To minimize idle cost, reduce min_instances so nodes scale down when not in use, while keeping max_instances unchanged.

Question 100

HOTSPOT - You collect data from a nearby weather station. You have a pandas dataframe named weather_df that includes the following data: The data is collected every 12 hours: noon and midnight. You plan to use automated machine learning to create a time-series model that predicts temperature over the next seven days. For the initial round of training, you want to train a maximum of 50 different models. You must use the Azure Machine Learning SDK v2 to run an automated machine learning experiment to train these models. You need to configure the automated machine learning job and its settings. How should you configure parameters of the classes that implement the job? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 100 Illustration for DP-100 question 100
Show Answer
Correct Answer: Job type: Forecasting Target column name: Temperature Time column name: Observation_time Forecast horizon: 14 Iterations: 50
Explanation:
This is a time-series prediction task, so the AutoML job type must be forecasting. The value to predict is the Temperature column, and the time index is Observation_time. Data is collected every 12 hours, so predicting 7 days ahead requires 14 time steps (forecast horizon = 14). The requirement to train a maximum of 50 models maps to setting iterations (max models) to 50.

Question 101

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You use Azure Machine Learning designer to load the following datasets into an experiment: Dataset1 - Dataset2 - You need to create a dataset that has the same columns and header row as the input datasets and contains all rows from both input datasets. Solution: Use the Join Data module. Does the solution meet the goal?

A. Yes
B. No
Show Answer
Correct Answer: B
Explanation:
The goal is to append all rows from two datasets that already have the same schema (same columns and header). The Join Data module is designed for relational joins based on key columns and will attempt to match rows, potentially introducing nulls or requiring join keys. To simply stack rows from both datasets without matching logic, the correct module is Add Rows. Therefore, using Join Data does not meet the goal.

Question 102

You create an Azure Machine Learning managed compute resource. The compute resource is configured as follows: • Minimum nodes: 2 • Maximum nodes: 4 You must decrease the minimum number of nodes and increase the maximum number of nodes to the following values: • Minimum nodes: 0 • Maximum nodes: 8 You need to reconfigure the compute resource. Which three methods can you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A. Azure Machine Learning designer
B. MLClient class in Python SDK v2
C. Azure Machine Learning studio
D. Azure CLI ml extension v2
E. BuildContext class in Python SDK v2
Show Answer
Correct Answer: B, C, D
Explanation:
Azure Machine Learning managed compute scaling settings (minimum and maximum nodes) can be reconfigured using supported management interfaces: the Python SDK v2 via the MLClient class, Azure Machine Learning studio through the compute cluster settings UI, and the Azure CLI ml extension v2. The Azure Machine Learning designer is for building pipelines and does not manage compute scaling, and the BuildContext class is unrelated to compute configuration.

Question 103

You build a data pipeline in an Azure Machine Learning workspace by using the Azure Machine Learning SDK for Python. You need to run a Python script as a pipeline step. Which two classes could you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A. PythonScriptStep
B. AutoMLStep
C. CommandStep
D. StepRun
Show Answer
Correct Answer: A, C
Explanation:
PythonScriptStep is specifically designed to run a Python script as a pipeline step. CommandStep can also run a Python script by invoking it as a command (for example, `python train.py`). AutoMLStep is for automated ML workflows, not arbitrary scripts, and StepRun represents a run result, not a pipeline step definition.

Question 104

HOTSPOT - You create an Azure Machine Learning workspace. You plan to write an Azure Machine Learning SDK for Python v2 script that logs an image for an experiment. The logged image must be available from the images tab in Azure Machine Learning Studio. You need to complete the script. Which code segments should you use? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 104
Show Answer
Correct Answer: mlflow log_artifact("image1.png")
Explanation:
In Azure Machine Learning SDK v2, experiment logging is done through MLflow. Using mlflow.log_artifact() uploads the image file as an artifact, which makes it visible under the Images tab in Azure Machine Learning Studio.

Question 105

You create an Azure Machine Learning workspace. You must use the Python SDK v2 to implement an experiment from a Jupyter notebook in the workspace. The experiment must log a list of numeral metrics. You need to implement a method to log a list of numeral metrics. Which method should you use?

A. mlflow.log_metric()
B. mlflow.log.batch()
C. mlflow.log_image()
D. mlflow.log_artifact()
Show Answer
Correct Answer: B
Explanation:
In Azure Machine Learning SDK v2, experiments use MLflow for tracking. To log a list (batch) of numeric metrics efficiently in one call, you should use mlflow.log_batch(), which is designed for logging multiple metrics at once. mlflow.log_metric() logs a single metric per call, while the other options are for images or artifacts.

Question 106

Note: This question is part of a series of questions that present the same scenario. Each question in the series contains a unique solution that might meet the stated goals. Some question sets might have more than one correct solution, while others might not have a correct solution. After you answer a question in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. You train and register an Azure Machine Learning model. You plan to deploy the model to an online endpoint. You need to ensure that applications will be able to use the authentication method with a non-expiring artifact to access the model. Solution: Create a Kubernetes online endpoint and set the value of its auth_mode parameter to aml_token. Deploy the model to the online endpoint. Does the solution meet the goal?

A. Yes
B. No
Show Answer
Correct Answer: B
Explanation:
The goal requires a non-expiring authentication artifact. An Azure ML online endpoint configured with auth_mode=aml_token uses Azure ML access tokens, which are time-limited and expire. Non-expiring access would require key-based authentication (auth_mode=key), not aml_token. Therefore, the solution does not meet the goal.

Question 107

DRAG DROP - You create a multi-class image classification deep learning model. The model must be retrained monthly with the new image data fetched from a public web portal. You create an Azure Machine Learning pipeline to fetch new data, standardize the size of images, and retrain the model. You need to use the Azure Machine Learning Python SDK v2 to configure the schedule for the pipeline. The schedule should be defined by using the frequency and interval properties, with frequency set to “month" and interval set to "1". Which three classes should you instantiate in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.

Illustration for DP-100 question 107
Show Answer
Correct Answer: PipelineJob RecurrenceTrigger JobSchedule
Explanation:
In Azure ML SDK v2, you first define the PipelineJob to be executed. To schedule it using frequency and interval (monthly), you then create a RecurrenceTrigger. Finally, you wrap the job and trigger together by instantiating a JobSchedule.

$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.