
Answer-first summary for fast verification
Answer: No
The solution does not meet the goal because run.upload_file() uploads files to the run's outputs folder for artifact storage, not for recording metrics. The goal requires recording unique label values as metrics that can be reviewed later as run metrics. The community discussion (with 100% consensus for 'No') and upvoted comments explain that run.log() expects scalar values, while unique label values are typically arrays/lists, so run.log_list() would be the appropriate method to log multiple values as metrics. The uploaded file approach stores data as artifacts rather than metrics, making it unsuitable for the stated requirement.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
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')
run.upload_file('outputs/labels.csv', './data.csv')
Does the solution meet the goal?

A
Yes
B
No
No comments yet.