Exam Certified Machine Learning Professional All QuestionsBrowse all questions from this exam
Question 3

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?

    Correct Answer: A

    In order to nest the child runs under the parent run, the child run blocks need to be indented within the parent run block. This way, the child runs are executed within the context of the parent run, allowing MLflow to correctly nest the runs.

Discussion
zafarsohaibOption: A

A should be the correct answer.

sindhu_gowdaOption: A

A is correct

c4b65b5Option: A

A is correct

hugodscarvalhoOption: A

Doc: https://www.restack.io/docs/mlflow-knowledge-mlflow-nested-run-example

random_data_guyOption: A

A should be correct - see https://mlflow.org/docs/latest/python_api/mlflow.html#mlflow.start_run for an example (where nested=True is added to children runs + they have different names)

mozucaOption: A

The answer is A since the correct sintax is: with mlflow.start_run(run_name="Nested Example") as run: # Create nested run with nested=True argument with mlflow.start_run(run_name="Child 1", nested=True): mlflow.log_param("run_name", "child_1") with mlflow.start_run(run_name="Child 2", nested=True): mlflow.log_param("run_name", "child_2")

BokNinjaOption: A

A. Indent the child run blocks within the parent run block