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…
Question
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)- A4% (1)
- B13% (3)
- C4% (1)
- D79% (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
Community Discussion
No community discussion yet for this question.
