DP-100 · Question #335
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…
The correct answer is D. mlflow.log_text("my_metric", my_dict). The correct syntax is mlflow.log_text. When you need to log dictionary-type data as an artifact in MLflow, you convert or represent the dictionary as a string/text and log it using mlflow.log_text, which stores the content as a text artifact file associated with the run. The…
Question
Options
- Amlflow.log_input(my_dict)
- Bmlflow.log_metric("my_metric", my_dict)
- Cmlflow.log_metrics(my_dict)
- Dmlflow.log_text("my_metric", my_dict)
How the community answered
(48 responses)- A4% (2)
- B10% (5)
- C15% (7)
- D71% (34)
Explanation
The correct syntax is mlflow.log_text. When you need to log dictionary-type data as an artifact in MLflow, you convert or represent the dictionary as a string/text and log it using mlflow.log_text, which stores the content as a text artifact file associated with the run. The other options are unsuitable: mlflow.log_input is for logging dataset inputs, mlflow.log_metric accepts only a single numeric value (not a dict), and mlflow.log_metrics expects a flat dictionary of string-to-float numeric metric values - not arbitrary dictionary artifacts.
Topics
Community Discussion
No community discussion yet for this question.