Databricks Certified Machine Learning Professional — Question 25

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?

Answer options

Correct answer: E

Explanation

The correct answer is E because mlflow.autolog() is designed to enable autologging for all supported libraries in MLflow, ensuring compatibility across different runtime versions and configurations. Options A and B are specific to certain libraries, thus limiting their scope. Option C attempts to set a configuration but does not invoke autologging directly, while option D incorrectly states that automatic logging is not possible.