QuestionQ4

VerifiedDatabricks Machine Learning

A data scientist is calculating feature importance as part of an MLflow run. The feature-importance values are stored in the pandas DataFrame importance_df and written as a CSV to the DBFS location importance_path. They want to log these values with their active MLflow run.

Which of the following lines of code can the data scientist use to log the feature-importance values with their active MLflow run?

Explanation

mlflow.log_artifact logs a local file or directory to the currently active MLflow run. Since the feature-importance data has been saved as a CSV at importance_path, that path can be passed to log_artifact. A DataFrame is not a numeric metric and cannot be passed directly to mlflow.log_metric.

Learn more

Community Discussion

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