
Answer-first summary for fast verification
Answer: mlflow.log.batch()
The question specifically asks for logging a list of numerical metrics, not individual metrics. While mlflow.log_metric() (option A) can log single metrics, it would require looping through the list, which is inefficient for multiple metrics. The community discussion shows strong consensus for mlflow.log_batch() (option B) with 60% support and multiple references to Microsoft documentation stating that for logging multiple metrics, better performance is achieved by logging a batch. The Microsoft documentation link provided in the discussion explicitly recommends batch logging for multiple metrics to avoid performance issues with looped log_metric calls. Options C (log_image) and D (log_artifact) are for logging images and files respectively, not numerical metrics.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
You create an Azure Machine Learning workspace and need to use the Python SDK v2 in a Jupyter notebook to implement an experiment that logs a list of numerical metrics.
Which method should you use?
A
mlflow.log_metric()
B
mlflow.log.batch()
C
mlflow.log_image()
D
mlflow.log_artifact()
No comments yet.