New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Microsoft DP-100 Exam - Topic 10 Question 49 Discussion

Actual exam question for Microsoft's DP-100 exam
Question #: 49
Topic #: 10
[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.log_list('Label Values', label_vals)

Does the solution meet the goal?

Show Suggested Answer Hide Answer
Suggested Answer: A

run.log_list log a list of values to the run with the given name using log_list.

Example: run.log_list('accuracies', [0.6, 0.7, 0.87])

Note:

Data= pd.read_csv('data.csv')

Data is read into a pandas.DataFrame, which is a two-dimensional, size-mutable, potentially heterogeneous tabular data.

label_vals =data['label'].unique

label_vals contains a list of unique label values.


https://www.element61.be/en/resource/azure-machine-learning-services-complete-toolbox-ai

https://docs.microsoft.com/en-us/python/api/azureml-core/azureml.core.run(class)

https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html

Contribute your Thoughts:

0/2000 characters
Chauncey
4 months ago
Just to confirm, 'label_vals' is defined earlier, right?
upvoted 0 times
...
Ellsworth
4 months ago
Seems right, but can we really log lists like that?
upvoted 0 times
...
Na
4 months ago
I thought you needed to use a different method for logging?
upvoted 0 times
...
Lai
5 months ago
Definitely meets the goal, nice!
upvoted 0 times
...
Reynalda
5 months ago
That code looks good for logging metrics!
upvoted 0 times
...
Lelia
5 months ago
I feel like this could work, but I wonder if there are any specific requirements for the format of `label_vals`. Did we cover that in practice?
upvoted 0 times
...
Goldie
5 months ago
I'm a bit confused about the syntax. I thought we needed to use a different method to log metrics. Is `log_list` even a valid method?
upvoted 0 times
...
Maynard
5 months ago
I remember a similar question where we had to log metrics, and I think this solution is correct. It seems to fit the requirement of recording unique labels.
upvoted 0 times
...
Mammie
5 months ago
I think using `run.log_list` is the right approach, but I'm not entirely sure if it should be `log_list` or `log` for metrics.
upvoted 0 times
...
Andrew
5 months ago
This seems straightforward - I think I'd go with option C to select the channels and then activate it.
upvoted 0 times
...
Myra
5 months ago
I'm unsure if multi-Site architecture is the right choice, but I think it ties into disaster recovery needs.
upvoted 0 times
...
Walton
5 months ago
I'm a bit unsure, but I feel like it could also be about "Consequence of failure." Isn't that more about what happens if something goes wrong?
upvoted 0 times
...

Save Cancel