Databricks Machine Learning Associate Question 109
Select 3You are training a machine learning model in Databricks and want to track different components of your workflow using MLflow. During the training process, you decide to create a nested run to organize tracking for a hyperparameter tuning step within the main experiment run. Which of the following statements about nested runs is correct?
- A
Nested runs allow you to group related tasks, such as hyperparameter tuning, under a parent run for better organization.
- B
To create a nested run, you must explicitly set the
nestedparameter toTruewhen starting the child run. - C
Nested runs are automatically created whenever you log metrics or parameters in a loop within a single parent run.
- D
You can view nested runs in the MLflow UI, where they are displayed hierarchically under the parent run.
- E
Nested runs require a separate MLflow experiment compared to the parent run.
Show answer and explanation
Correct answers: A, B, D
Explanation
Nested runs in MLflow are a powerful feature for organizing complex workflows, such as hyperparameter tuning or multi-step pipelines, within a single experiment. To create a nested run, you must explicitly set the nested=True parameter when starting the child run. These runs are displayed hierarchically in the MLflow UI for better tracking and analysis. They do not require a separate experiment and are not created automatically.
- A. Correct.
Correct: Nested runs are designed to help organize related tasks under a parent run, such as tracking experiments with multiple sub-tasks like hyperparameter tuning.
- B. Correct.
Correct: When starting a new run using
mlflow.start_run, you must explicitly set thenested=Trueparameter to indicate that it is a nested run. - C. Incorrect.
Incorrect: Nested runs are not created automatically. You must explicitly define them by starting a new run with the
nested=Trueparameter. - D. Correct.
Correct: MLflow UI supports nested runs and displays them hierarchically under their parent run, making it easier to analyze related tasks.
- E. Incorrect.
Incorrect: Nested runs do not require a separate experiment. They exist within the same MLflow experiment as the parent run.