Databricks Certified Machine Learning Associate · Free Practice Question Medium

Question 13

A data scientist employs MLflow for tracking their machine learning experiment. As part of each MLflow run, they conduct hyperparameter tuning. The scientist wishes to organize one parent run for the tuning procedure and have a child run for each unique combination of hyperparameter values. They manually initiate all parent and child runs using 'mlflow.start_run()'.

Which methodology should the data scientist adopt to achieve this MLflow run organization?

Choose only ONE best answer.


  • A

    They could initiate each child run with the identical experiment ID as the parent run.

  • B

    They could specify 'nested=True' when initiating the child run for each unique combination of hyperparameter values.

  • C

    They could begin each child run inside the indented code block of the parent run using 'mlflow.start_run()'.

  • D

    They could enable Databricks Autologging.

  • E

    They could specify 'nested=True' when initiating the parent run for the tuning process.

Reveal correct answer

Correct answer: B

Explanation

Correct Answer:
They could specify nested=True when initiating the child run for each unique combination of hyperparameter values.

Explanation:

To organize MLflow runs into a parent-child hierarchy (e.g., one parent run for hyperparameter tuning and child runs for each hyperparameter combination), use the nested=True flag when starting child runs. This ensures child runs are nested under the parent run, maintaining a clear structure in the MLflow UI.

Steps to Implement:

  1. Start the parent run:


  2. Start child runs inside the parent context:


Why This Works:

  • nested=True: Explicitly declares the child run as nested under the active parent run.

  • UI Organization: Child runs appear grouped under the parent in the MLflow Experiments page.

Why Other Options Are Incorrect:

  1. Same experiment ID for all runs:

    • Does not create a hierarchy; runs are flat siblings.

  2. Indented code block without nested=True:

    • Runs are siblings unless nested=True is specified.

  3. Databricks Autologging:

    • Automates logging but does not control run hierarchy.

  4. nested=True on the parent run:

    • nested=True is only valid for child runs (parent runs cannot be nested).

Key Takeaway:

For parent-child run organization:
✅ Use with mlflow.start_run(nested=True) for child runs.
✅ Parent runs must be active when child runs are created.

Example MLflow UI View:

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need