
Answer-first summary for fast verification
Answer: `metrics = runs[0].data.metrics`
In Databricks MLflow, once you have retrieved the most recent run from an experiment using the MLflow client, you can access the metrics of the best run by using `runs[0].data.metrics`. This will return a dictionary containing the metric keys and their respective values.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
After retrieving the most recent run from an experiment in Databricks MLflow using the MLflow client with the command runs = client.search_runs(experiment_id, order_by=["attributes.start_time desc"], max_results=1), how can you access the metrics of this run? Choose only ONE best answer.
A
metrics = runs[0].fetch_metrics()
B
metrics = runs[0].data.metrics
C
metrics = runs[0].get_metrics()
D
metrics = runs[0].metrics.data