HOTSPOT
-
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 table in the following format:
table = {
"col1" : [1, 2, 3],
"col2" : [4, 5, 6]
)
You need to complete the Python code to log the table.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Show Answer
Correct Answer: json.dump
mlflow.log_artifact
Explanation: The table must be written to a JSON file, which requires json.dump when the file is opened in write mode. To log the file in an Azure ML experiment using the Python SDK v2, the JSON file is logged as an artifact with mlflow.log_artifact.
Question 78
HOTSPOT -
You manage an Azure Machine Learning workspace. You configure an automated machine learning regression training job by using the Azure Machine Learning Python SDK v2.
You configure the regression job by using the following script:
For each of the following statements, select Yes if the statement is true. Otherwise, select No.
Show Answer
Correct Answer: Yes
Yes
Yes
No
Explanation: enable_early_termination=True stops the job when the score stops improving over a defined evaluation window.
max_concurrent_trials=5 limits parallel AutoML trials to five.
timeout_minutes=60 defines the overall job timeout, so an individual trial can run up to that limit if not ended earlier.
The timeout is explicitly set to 60 minutes, not the default one‑month limit.
Question 79
HOTSPOT
-
You download a .csv file from a notebook in an Azure Machine Learning workspace to a data/sample.csv folder on a compute instance. The file contains 10,000 records.
You must generate the summary statistics for the data in the file. The statistics must include the following for each numerical column:
• number of non-empty values
• average value
• standard deviation
• minimum and maximum values
• 25th, 50th, and 75th percentiles
You need to complete the Python code that will generate the summary statistics.
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: pandas
describe
Explanation: Use pandas to read the CSV into a DataFrame, then call describe() to automatically compute count, mean, standard deviation, min/max, and the 25th, 50th, and 75th percentiles for numerical columns.
Question 80
HOTSPOT
-
You are running a training experiment on remote compute in Azure Machine Learning (ML) by using Azure ML SDK v2 for Python.
The experiment is configured to use a conda environment that includes all required packages.
You must track metrics generated in the experiment.
You need to complete the script for the experiment.
How should you complete the code? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Explanation: Azure ML SDK v2 uses MLflow for experiment tracking. You must import MLflow, start a run before logging, log metrics with mlflow.log_metric, and properly close the run with mlflow.end_run.
Question 81
You create an Azure Machine Learning workspace named workspace1. The workspace contains a Python SDK v2 notebook that uses MLflow to collect model training metrics and artifacts from your local computer.
You must reuse the notebook to run on Azure Machine Learning compute instance in workspace1.
You need to continue to log metrics and artifacts from your data science code.
What should you do?
A. Instantiate the job class.
B. Instantiate the MLCIient class.
C. Log in to workspace1.
D. Configure the tracking URL.
Show Answer
Correct Answer: D
Explanation: When running the notebook on an Azure Machine Learning compute instance, MLflow must be configured to point to the workspace’s MLflow tracking server to continue logging metrics and artifacts. This is done by setting/configuring the MLflow tracking URI (tracking URL), which uses the azureml:// protocol. Logging in or instantiating SDK classes alone does not configure MLflow tracking.
Question 82
You plan to run a script as an experiment. The script uses modules from the SciPy library and several Python packages that are not typically installed in a default conda environment.
You plan to run the experiment on your local workstation for small datasets and scale out the experiment by running it on more powerful remote compute dusters for larger datasets.
You need to ensure that the experiment runs successfully on local and remote compute with the least administrative effort.
What should you do?
A. Leave the environment unspecified for the experiment. Run the expenment by using the default environment.
B. Create a config.yaml file that defines the required conda packages and save the file in the experiment folder.
C. Create and register an environment that includes the required packages. Use this environment for all experiment jobs.
D. Create a virtual machine (VM) by using the required Python configuration and attach the VM as a compute target. Use this compute target for all experiment runs.
Show Answer
Correct Answer: C
Explanation: Registering a reusable environment that includes SciPy and all required packages ensures consistent dependencies across local and remote compute targets with minimal administrative effort. It avoids relying on defaults, ad hoc configs, or managing custom VMs, and is the recommended way to scale experiments reliably.
Question 83
HOTSPOT
-
You are using the Azure Machine Learning designer to transform a dataset containing the census data of all nations.
You must use the Split Data component to separate the dataset into two datasets. The first dataset must contain the census data of the United States. The second dataset must include the census data of the remaining nations.
You need to configure the component to create the datasets.
Which configuration values should you use? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Explanation: Use a regular expression split to filter rows where the nation column equals USA. The first output contains USA records; the second output automatically contains all remaining nations.
Question 84
HOTSPOT
-
You are using the Azure Machine Learning designer to transform a dataset by using an Execute Python Script component and custom code.
You need to define the method signature for the Execute Python Script component and return value type.
What should you define? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Explanation: In Azure Machine Learning Designer, the Execute Python Script component requires a function named azurerml_main that accepts up to two input dataframes. The component expects the output to be a Pandas DataFrame to pass the transformed dataset to the next module.
Question 85
HOTSPOT
-
You have an Azure Machine learning workspace. The workspace contains a dataset with data in a tabular form.
You plan to use the Azure Machine Learning SDK for Python v1 to create a control script that will load the dataset into a pandas dataframe in preparation for model training. The script will accept a parameter designating the dataset.
You need to complete the 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.
Explanation: The dataset name or ID is passed as a script argument, so the dataset is retrieved from the workspace using Dataset.get_by_id(). Once loaded as a Dataset object, it is converted into a pandas DataFrame using to_pandas_dataframe() for model training.
Question 86
HOTSPOT
-
You are developing code to analyze a dataset that includes age information for a large group of diabetes patients. You create an Azure Machine Learning workspace and install all required libraries. You set the privacy budget to 1.0.
You must analyze the dataset and preserve data privacy. The code must run twice before the privacy budget is depleted.
You need to complete the code.
Which values 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: opendp.smartnoise.core
epsilon
Explanation: To apply differential privacy in Azure ML, the SmartNoise (OpenDP) library is required. The privacy budget is controlled using epsilon, and setting epsilon to 0.50 allows the analysis to run twice before the total budget of 1.0 is exhausted.
$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.