nerdexam
Microsoft

DP-100 · Question #522

You have an Azure Machine Learning workspace. You are configuring logging for metrics by using MLflow during a model training job run in the workspace. One metric has a Boolean value. You need to…

The correct answer is D. Convert the metric to a numeric value. MLflow's mlflow.log_metric() function only accepts numeric values (integers or floats). Boolean values are not supported as metric types. Before you can log a Boolean metric, you must first convert it to a numeric value (e.g., True → 1, False → 0). Options A and B…

Explore data, and run experiments

Question

You have an Azure Machine Learning workspace. You are configuring logging for metrics by using MLflow during a model training job run in the workspace. One metric has a Boolean value. You need to log the metric. What should you do first?

Exhibit

DP-100 question #522 exhibit

Options

  • ARun mlflow.log_params().
  • BRun mlflow.log_param().
  • CConvert the metric to a string value.
  • DConvert the metric to a numeric value.

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    13% (3)
  • C
    4% (1)
  • D
    79% (19)

Explanation

MLflow's mlflow.log_metric() function only accepts numeric values (integers or floats). Boolean values are not supported as metric types. Before you can log a Boolean metric, you must first convert it to a numeric value (e.g., True → 1, False → 0). Options A and B (log_params/log_param) are used for logging hyperparameters, not metrics, and converting to a string would still not satisfy mlflow.log_metric()'s numeric requirement.

Topics

#MLflow#Metric Logging#Azure Machine Learning#Data Type Conversion

Community Discussion

No community discussion yet for this question.

Full DP-100 Practice