Designing and Implementing a Data Science Solution on Azure — Question 147
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_input(my_dict)
- B. mlflow.log_metric("my_metric", my_dict)
- C. mlflow.log_metrics(my_dict)
- D. mlflow.log_text("my_metric", my_dict)
Correct answer: C
Explanation
The correct answer is C, as mlflow.log_metrics(my_dict) is specifically designed to log a dictionary of metrics. Options A and B are incorrect because they do not support logging dictionaries as metrics, while option D is meant for logging text, which does not apply in this context.