Microsoft

DP-100 Free Practice Questions — Page 20

Question 200

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 have the following Azure subscriptions and Azure Machine Learning service workspaces: You need to obtain a reference to the ml-project workspace. Solution: Run the following Python code: Does the solution meet the goal?

A. Yes
B. No
Show Answer
Correct Answer: A
Explanation:
The Python code uses Workspace.from_config(), which loads the Azure Machine Learning workspace details from a local config.json file. If the ml-project workspace information is stored in that configuration file—as implied by the scenario—this method correctly returns a reference to the ml-project workspace. Therefore, the solution meets the goal.

Question 201

HOTSPOT - You build a data pipeline in an Azure Machine Learning workspace by using the Azure Machine Learning SDK for Python. You create a data preparation step in the data pipeline. You create the following code fragment in Python: For each of the following statements, select Yes if the statement is true. Otherwise, select No. NOTE: Each correct selection is worth one point.

Illustration for DP-100 question 201 Illustration for DP-100 question 201
Show Answer
Correct Answer: Yes No Yes
Explanation:
The step uses the specified compute_target and runconfig. With allow_reuse=True, a new run is not always created if a cached run can be reused. Dataset inputs/outputs passed to a step are tracked and logged by Azure ML.

Question 202

HOTSPOT - You train a model by using Azure Machine Learning. You use Azure Blob Storage to store production data. The model must be re-trained when new data is uploaded to Azure Blob Storage. You need to minimize development and coding. You need to configure Azure services to develop a re-training solution. Which Azure services 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 202
Show Answer
Correct Answer: Identify when new data is uploaded: Event Grid Trigger re-training: Logic Apps
Explanation:
Azure Blob Storage natively emits events to Event Grid when blobs are created or updated, making it the simplest way to detect new data. To minimize development and coding, Azure Logic Apps can subscribe to Event Grid events and orchestrate the retraining workflow in Azure Machine Learning using built-in connectors, avoiding custom code.

Question 203

HOTSPOT - You load data from a notebook in an Azure Machine Learning workspace into a pandas dataframe named df. The data contains 10,000 patient records. Each record includes the Age property for the corresponding patient. You must identify the mean age value from the differentially private data generated by SmartNoise SDK. You need to complete the Python code that will generate the mean age value from the differentially private data. 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 203
Show Answer
Correct Answer: Analysis() epsilon
Explanation:
SmartNoise uses an Analysis context to manage privacy accounting for aggregate queries. The dp_mean function consumes privacy budget specified by epsilon (not alpha or delta) to produce a differentially private mean age.

Question 204

You use Azure Machine Learning to train a model. You must use a sampling method for tuning hyperparameters. The sampling method must pick samples based on how the model performed with previous samples. You need to select a sampling method. Which sampling method should you use?

A. Grid
B. Bayesian
C. Random
Show Answer
Correct Answer: B
Explanation:
Bayesian sampling selects new hyperparameter values based on the performance of previous trials, using a probabilistic model to guide the search. Grid and Random sampling do not use feedback from earlier runs.

Question 205

You create a multi-class image classification model with automated machine learning in Azure Machine Learning. You need to prepare labeled image data as input for model training in the form of an Azure Machine Learning tabular dataset. Which data format should you use?

A. COCO
B. JSONL
C. JSON
D. Pascal VOC
Show Answer
Correct Answer: B
Explanation:
Azure Machine Learning AutoML for images requires labeled image data to be provided as a tabular dataset (MLTable), where each row corresponds to an image and its labels. Microsoft specifies that this tabular representation should be prepared in JSONL (JSON Lines) format, with one JSON object per line describing the image path and labels. Formats like COCO or Pascal VOC are annotation standards but are not used directly as tabular datasets for AutoML image training.

Question 206

You create a training pipeline by using the Azure Machine Learning designer. You need to load data into a machine learning pipeline by using the Import Data component. Which two data sources could you use? Each correct answer presents a complete solution. NOTE: Each correct selection is worth one point.

A. Azure SQL Database
B. Registered dataset
C. URL via HTTP
D. Azure Blob storage container through a registered datastore
E. Azure Data Lake Storage Gen2
Show Answer
Correct Answer: C, D
Explanation:
The Import Data component in Azure Machine Learning designer can read data directly from a public URL via HTTP and from Azure cloud storage that is accessed through a registered datastore, such as an Azure Blob storage container. Registered datasets are consumed by other components, and while additional sources like SQL or ADLS Gen2 are supported, the question requires only two valid sources.

Question 207

HOTSPOT - You create an Azure Machine Learning dataset containing automobile price data. The dataset includes 10,000 rows and 10 columns. You use the Azure Machine Learning designer to transform the dataset by using an Execute Python Script component and custom code. The code must combine three columns to create a new column. You need to configure the code function. Which configurations 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 207
Show Answer
Correct Answer: Entry point function name: azureml_main Function return type: dataframe
Explanation:
In Azure Machine Learning Designer, the Execute Python Script component requires an entry function named azureml_main. Since the transformation creates a new column from existing columns, the output is a modified tabular dataset, which must be returned as a dataframe.

Question 208

HOTSPOT - You have machine learning models that produce unfair predictions across sensitive features. You must use a post-processing technique to apply a constraint to the models to mitigate their unfairness. You need to select a post-processing technique and model type. What 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 208
Show Answer
Correct Answer: Threshold Optimizer Binary classification
Explanation:
Threshold Optimizer is a post-processing fairness technique that enforces fairness constraints by adjusting decision thresholds after training. It applies to binary classification models, not regression or time series models.

Question 209

DRAG DROP - You need to implement source control for scripts in an Azure Machine Learning workspace. You use a terminal window in the Azure Machine Learning Notebook tab. You must authenticate your Git account with SSH. You need to generate a new SSH key. Which four actions should you perform 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 209
Show Answer
Correct Answer: Run the ssh-keygen command. Press Enter when prompted to enter a file in which to save the key. Verify that the default location is '/home/azureuser/.ssh' and press Enter. Type a secure passphrase.
Explanation:
This follows the standard ssh-keygen flow: start key generation, accept the default save location, confirm the path, and secure the private key with a passphrase.

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