Databricks Machine Learning Professional Question 41
Select 2You are training multiple machine learning models in a Databricks notebook and want to track each model's metrics and parameters separately while maintaining a hierarchical relationship between runs. What are the requirements for enabling nested runs in MLflow?
- A
Ensure that the MLflow tracking server is running
- B
Set the
nested=Trueargument when starting child runs usingmlflow.start_run() - C
Enable the
nested_runs_enabledconfiguration in the MLflow tracking server settings - D
Start the parent run using
mlflow.start_run()before starting any child runs - E
Use a unique experiment ID for each nested run
Show answer and explanation
Correct answers: B, D
Explanation
To track nested runs in MLflow, you need to first start a parent run using mlflow.start_run() and then start each child run with the nested=True parameter. This ensures that child runs are properly nested under the parent run and their metrics, parameters, and artifacts are hierarchically organized. Other options, such as specific server-side configurations or unique experiment IDs, are not required for nested runs.
- A. Incorrect.
MLflow tracking server must be running to log runs, but it is not a specific requirement for tracking nested runs. Nested runs are supported by default in MLflow without additional server-side configuration.
- B. Correct.
The
nested=Trueargument is required when starting a child run usingmlflow.start_run()to indicate that the run should be nested under the currently active parent run. - C. Incorrect.
There is no
nested_runs_enabledconfiguration in the MLflow tracking server. Nested runs are a client-side feature and do not require server-side settings. - D. Correct.
A parent run must be started using
mlflow.start_run()before any child runs. Without an active parent run, child runs cannot be nested. - E. Incorrect.
Using a unique experiment ID for each nested run is not necessary. Nested runs can be tracked within the same experiment.