nerdexam
Microsoft

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…

Explore data and run experiments

Question

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?

Options

  • Amlflow.log_metric()
  • Bmlflow.log.batch()
  • Cmlflow.log_image()
  • Dmlflow.log_artifact()

How the community answered

(32 responses)
  • A
    88% (28)
  • B
    3% (1)
  • C
    3% (1)
  • D
    6% (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

#Azure Machine Learning#MLflow#Experiment Tracking#Logging Metrics

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice