
Answer-first summary for fast verification
Answer: No
The solution does NOT meet the goal. While the community initially showed 100% support for answer 'A' (Yes), a later detailed comment with 2 upvotes correctly points out that `run.log_list()` requires a Python list as input, but `label_vals` likely contains a numpy.ndarray or ExtensionArray from pandas' `unique()` function. These array types are not directly compatible with `log_list()`, which expects a standard Python list. To make this work correctly, the code should convert the array to a list first using `label_vals.tolist()` or `list(label_vals)`. The initial community consensus appears to be based on superficial understanding rather than actual testing of the data type compatibility.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You are using a Python script for an Azure Machine Learning experiment. The script references the experiment run context, loads data, identifies the unique values for the label column, and completes the run. You need to record these unique label values as run metrics.
You implement the following solution at the indicated point in the script:
run.log_list('Label Values', label_vals)
run.log_list('Label Values', label_vals)
Does this solution meet the goal?

A
Yes
B
No
No comments yet.