Databricks Machine Learning Professional Question 40
Select 2You are working on a machine learning project in Databricks where you need to track both a primary training run and several sub-runs, each corresponding to different hyperparameter configurations. Which of the following are required to properly track these nested runs using MLflow?
- A
Use the
start_runfunction with thenested=Trueargument for sub-runs. - B
Ensure that the primary run is active when starting sub-runs.
- C
Manually assign unique identifiers to each nested run to prevent conflicts.
- D
Use the
end_runfunction to close each sub-run before starting a new one. - E
Configure nested runs by enabling a specific setting in the Databricks workspace.
Show answer and explanation
Correct answers: A, B
Explanation
To track nested runs in MLflow, you must start sub-runs using the start_run function with the nested=True argument. Additionally, it is essential that the primary run is active when initiating sub-runs, as nested runs are tracked within the context of the primary run. MLflow manages unique identifiers and does not require additional workspace configuration for this functionality.
- A. Correct.
This is correct. To start a nested run in MLflow, the
start_runfunction must be called with thenested=Trueargument. - B. Correct.
This is correct. For nested runs to be properly tracked, the primary (parent) run must be active while starting any sub-runs.
- C. Incorrect.
This is incorrect. MLflow automatically handles unique identifiers for nested runs, so manual assignment is unnecessary.
- D. Incorrect.
This is incorrect. Sub-runs can remain open while other sub-runs are started, as long as they are properly nested under the primary run.
- E. Incorrect.
This is incorrect. No specific Databricks workspace configuration is required for enabling nested runs, as this functionality is handled by MLflow’s API.