Designing and Implementing a Data Science Solution on Azure — Question 111

You create an Azure Machine Learning workspace.

You must use the Python SDK v2 to implement an experiment from a Jupyter notebook in the workspace. The experiment must log a list of numeral metrics.

You need to implement a method to log a list of numeral metrics.

Which method should you use?

Answer options

Correct answer: B

Explanation

The correct answer is B, as mlflow.log.batch() is specifically designed to log multiple metrics at once, making it suitable for your requirement to log a list of numerical metrics. The other options, such as mlflow.log_metric(), log a single metric, while mlflow.log_image() and mlflow.log_artifact() are used for logging images and artifacts respectively, which are not applicable to logging numerical metrics.