
Explanation:
The question asks for logging dictionary-type artifacts in MLflow within Azure Machine Learning. The correct method is mlflow.log_metrics(my_dict) because it specifically accepts a dictionary of key-value pairs where keys are metric names and values are numeric metric values. This aligns with the community consensus where option C received 100% support and multiple comments with upvotes confirmed this is the proper method for logging multiple metrics from a dictionary. Option A (mlflow.log_input) is for logging dataset information, not metrics. Option B (mlflow.log_metric) only accepts single metric values, not dictionaries. Option D (mlflow.log_text) is for logging text strings, not metric dictionaries. While one comment mentioned log_params, that's for parameters, not metrics, and isn't relevant to the dictionary artifact logging requirement.
Ultimate access to all questions.
You are working with an MLflow model in an Azure Machine Learning workspace and training it interactively in a notebook. You need to log artifacts of the experiments that are of a dictionary type.
Which syntax should you use?
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)
No comments yet.