Databricks Machine Learning Associate Question 106
Single answerYou are training a machine learning model in Databricks and want to track separate stages of your experiment, such as data preprocessing, model training, and evaluation, while keeping the runs organized. Which approach should you use to achieve this?
- A
Create a new MLflow experiment for each stage of the process.
- B
Use MLflow nested runs to track each stage within a single parent run.
- C
Log all metrics, parameters, and artifacts in a single MLflow run without separation.
- D
Create separate MLflow tracking servers for each stage and log runs to the respective servers.
Show answer and explanation
Correct answer: B
Explanation
MLflow nested runs enable you to track multiple stages of a machine learning experiment, such as data preprocessing, model training, and evaluation, under a single parent run. This approach ensures better organization and traceability, making it easier to analyze the steps involved in the experiment. Nested runs are especially useful when you want to keep related processes grouped together without fragmenting your tracking efforts.
- A. Incorrect.
Creating a new MLflow experiment for each stage can lead to disorganization and fragmentation of experiment tracking. Nested runs are better suited for organizing multiple stages within the same experiment.
- B. Correct.
Using MLflow nested runs allows you to group related stages of the experiment under a single parent run, providing better organization and traceability.
- C. Incorrect.
Logging everything in a single MLflow run without separation makes it difficult to distinguish between different stages of the process, leading to poor experiment tracking.
- D. Incorrect.
Creating separate MLflow tracking servers for each stage is unnecessary and overly complex. It is not a recommended approach for organizing experiments.