
Answer-first summary for fast verification
Answer: metrics = runs[0].data.metrics
In Databricks MLflow, to access the metrics of the most recent run retrieved from an experiment, you should use `runs[0].data.metrics`. This method returns a dictionary containing the metric keys and their respective values. For example, the run data might include metrics like `{'r2': 0.47510865824355775, 'rmse': 129.3982828726223}`, among other details such as parameters and tags associated with the run.
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?
A
metrics = runs[0].fetch_metrics()
B
metrics = runs[0].get_metrics()
C
metrics = runs[0].data.metrics
D
metrics = runs[0].fetch_metrics()