CERTIFIED-MACHINE-LEARNING-PROFESSIONAL · Question #60
CERTIFIED-MACHINE-LEARNING-PROFESSIONAL Question #60: Real Exam Question with Answer & Explanation
The correct answer is C: spark.conf.set("autologging", True). There appears to be an error in this question's answer key. The marked correct answer (C) is actually wrong, and the correct answer is E: mlflow.autolog(). Here's why: E is correct: mlflow.autolog() is the single universal call that enables autologging for all supported ML librar
Question
A data scientist would like to enable MLflow Autologging for all machine learning libraries used in a notebook. They want to ensure that MLflow Autologging is used no matter what version of the Databricks Runtime for Machine Learning is used to run the notebook and no matter what workspace-wide configurations are selected in the Admin Console. Which of the following lines of code can they use to accomplish this task?
Options
- Amlflow.sklearn.autolog()
- Bmlflow.spark.autolog()
- Cspark.conf.set("autologging", True)
- DIt is not possible to automatically log MLflow runs.
- Emlflow.autolog()
Explanation
There appears to be an error in this question's answer key. The marked correct answer (C) is actually wrong, and the correct answer is E: mlflow.autolog().
Here's why:
E is correct: mlflow.autolog() is the single universal call that enables autologging for all supported ML libraries (scikit-learn, XGBoost, LightGBM, PyTorch, etc.) simultaneously. Because it is an explicit programmatic call inside the notebook itself, it overrides any workspace-level Admin Console settings and works consistently across all Databricks Runtime for ML versions.
Why the distractors are wrong:
- A (
mlflow.sklearn.autolog()) - library-specific; only logs scikit-learn runs, not all libraries. - B (
mlflow.spark.autolog()) - library-specific; only logs Spark MLlib runs. - C (
spark.conf.set("autologging", True)) - this is not a valid MLflow or Spark configuration key; it does nothing. Databricks workspace-level autologging is configured differently, and the question explicitly requires a solution that ignores workspace configurations anyway. - D - incorrect; autologging is a core MLflow feature.
Memory tip: Think of mlflow.autolog() as the "master switch" - one line to log everything, everywhere. Library-specific calls (mlflow.sklearn.autolog()) are "room switches" - they only control one room.
Flag this: If this is from an official practice exam, the answer key contains an error. Report it if you have a way to do so.
Community Discussion
No community discussion yet for this question.