DP-100 · Question #493
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…
The correct answer is A. mlflow.log_metric(). 'mlflow.log_metric(key, value, step)' logs a single numeric (float) value and is called iteratively to log a list of numerical metrics. Among the four choices, it is the only function that accepts and records numeric metric values. 'mlflow.log.batch()' uses invalid dot notation…
Question
Options
- Amlflow.log_metric()
- Bmlflow.log.batch()
- Cmlflow.log_image()
- Dmlflow.log_artifact()
How the community answered
(32 responses)- A88% (28)
- B3% (1)
- C3% (1)
- D6% (2)
Explanation
'mlflow.log_metric(key, value, step)' logs a single numeric (float) value and is called iteratively to log a list of numerical metrics. Among the four choices, it is the only function that accepts and records numeric metric values. 'mlflow.log.batch()' uses invalid dot notation (the correct client-level method is 'MlflowClient().log_batch()', not a top-level fluent API call). 'mlflow.log_image()' logs image objects as artifacts. 'mlflow.log_artifact()' uploads a local file path. For logging multiple numeric metrics in a single call, the correct fluent API is 'mlflow.log_metrics()' (plural), but since that is not an option, 'mlflow.log_metric()' called in a loop is the best available answer.
Topics
Community Discussion
No community discussion yet for this question.