CERTIFIED-MACHINE-LEARNING-PROFESSIONAL · Question #38
CERTIFIED-MACHINE-LEARNING-PROFESSIONAL Question #38: Real Exam Question with Answer & Explanation
The correct answer is E: Add the nested=True argument to the parent run and remove the nested=True arguments from. In MLflow, nested=True is the argument that marks a run as a child of the currently active run - it belongs on the child runs, not the parent. Option E is correct because it addresses both sides of the misconfiguration: the parent run must be a plain mlflow.start_run() (no nested
Question
A data scientist is using MLflow to track their machine learning experiment. As a part of each MLflow run, they are performing hyperparameter tuning. The data scientist would like to have one parent run for the tuning process with a child run for each unique combination of hyperparameter values. They are using the following code block: The code block is not nesting the runs in MLflow as they expected. Which of the following changes does the data scientist need to make to the above code block so that it successfully nests the child runs under the parent run in MLflow?
Options
- AIndent the child run blocks within the parent run block
- BAdd the nested=True argument to the parent run
- CRemove the nested=True argument from the child runs
- DProvide the same name to the run name parameter for all three run blocks
- EAdd the nested=True argument to the parent run and remove the nested=True arguments from
Explanation
In MLflow, nested=True is the argument that marks a run as a child of the currently active run - it belongs on the child runs, not the parent. Option E is correct because it addresses both sides of the misconfiguration: the parent run must be a plain mlflow.start_run() (no nested=True, since it has no parent to nest under), while each child run inside that context needs nested=True to signal it should attach to the active parent.
Why the distractors fail:
- A (indenting the blocks) - Python indentation affects code execution scope but does nothing to MLflow's run-tracking hierarchy; MLflow nesting is controlled through API arguments, not whitespace.
- B (adding
nested=Trueonly to the parent) - puttingnested=Trueon the parent makes MLflow treat it as a child of some other active run, breaking the hierarchy without fixing the children. - C (removing
nested=Trueonly from child runs) - this leaves all runs as siblings at the same level with no parent-child relationship at all. - D (sharing the same
run_name) - run names are labels only; MLflow nests runs based on thenestedflag and active run context, not name matching.
Memory tip: Think of nested=True like raising your hand to say "I belong under whoever is currently in charge." Only the child raises their hand - the parent just opens the meeting and waits.
Community Discussion
No community discussion yet for this question.