DP-100 Web TestEngine demo

Exit VCEDump DP-100 Designing and Implementing a Data Science Solution on Azure
Question 35 of 93
0% complete
Q35 Single choice

You plan to use a Python script to run an Azure Machine Learning experiment. The script creates a reference to the experiment run context, loads data from a file, identifies the set of unique values for the label column, and completes the experiment run:

from azureml.core import Run
import pandas as pd

run = Run.get_context()
data = pd.read_csv('data.csv')
label_vals = data['label'].unique()
# Add code to record metrics here run.complete()

The experiment must record the unique labels in the data as metrics for the run that can be reviewed later.

You must add code to the script to record the unique label values as run metrics at the point indicated by the comment.

Solution: Replace the comment with the following code:

for label_val in label_vals:
run.log('Label Values', label_val) Does the solution meet the goal?

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in