Designing and Implementing a Data Science Solution on Azure — Question 173
You manage an Azure Machine Learning workspace.
You experiment with an MLflow model that trains interactively by using a notebook in the workspace.
You need to log dictionary type artifacts of the experiments in Azure Machine Learning by using MLflow.
Which syntax should you use?
Answer options
- A. mlflow.log_artifact(my_dict)
- B. mlflow.log_metric("my_metric", my_dict)
- C. mlflow.log_metrics(my_dict)
- D. mlflow.log_artifacts(my_dict)
Correct answer: C
Explanation
The correct answer is C, mlflow.log_metrics(my_dict), because this function is specifically designed to log multiple metrics as a dictionary. Option A is incorrect as it is used for logging a single artifact, while B is for logging a single metric value. Option D logs multiple artifacts, not metrics, making it unsuitable for dictionary-type artifacts.