exam questions

Exam DP-100 All Questions

View all questions & answers for the DP-100 exam

Exam DP-100 topic 3 question 55 discussion

Actual exam question from Microsoft's DP-100
Question #: 55
Topic #: 3
[All DP-100 Questions]

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 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:

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:
run.upload_file('outputs/labels.csv', './data.csv')
Does the solution meet the goal?

  • A. Yes
  • B. No
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ajay0011
6 months, 4 weeks ago
Selected Answer: B
should use run.log_list("Unique Label Values", label_vals) because labels can be more than one value.
upvoted 3 times
...
JTWang
1 year, 6 months ago
label_vals is numpy.ndarray Scalar Example: run.log("accuracy", 0.95) List Example: run.log_list("accuracies", [0.6, 0.7, 0.87]) Row Example: run.log_row("Y over X", x=1, y=0.4) Table Example: run.log_table("Y over X", {"x":[1, 2, 3], "y":[0.6, 0.7, 0.89]}) Image Example: run.log_image("ROC", path)
upvoted 3 times
...
ranjsi01
1 year, 9 months ago
no is correct. should use run.log
upvoted 3 times
ajay0011
6 months, 4 weeks ago
If you use run.log() to log the unique label values, it will raise an exception because the run.log() method expects a key-value pair, where the key is a string and the value can be a number, string, or boolean. The unique method of a Pandas DataFrame returns an array of unique values, which is not a valid type for logging using the run.log() method.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago