QuestionQ110

VerifiedAdvanced MLflow Usage

A Data Scientist is building a model-training pipeline in Databricks and must track custom performance metrics while training. They want to record a custom evaluation score (team_score), one hyperparameter, and a confusion-matrix plot in their MLflow experiment.

Which code snippet correctly logs all three information types in MLflow?

Explanation

MLflow logs a hyperparameter with mlflow.log_param(key, value), a scalar performance measurement with mlflow.log_metric(key, numeric_value), and a confusion-matrix PNG as a file artifact with mlflow.log_artifact("confusion_matrix.png").

Learn more

Community Discussion

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