QuestionQ45

VerifiedAdvanced MLflow Usage

A data scientist is using MLflow to track machine-learning experiments. After finishing a run with run ID run_id for the experiment with experiment ID exp_id, the data scientist needs to programmatically retrieve the metrics logged for run_id. They have an active MLflow Client client and an active Spark session spark.

Which code line can be used to return the logged metrics for run_id?

Explanation

MlflowClient.get_run(run_id) retrieves the run identified by its run ID. The returned Run object exposes its logged parameters, tags, and metrics through data; therefore, data.metrics returns the run’s logged metric values. The experiment ID is not required to fetch a specific run.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!