Home / ML Associate practice test / Model Development / Question

Databricks Machine Learning Associate · free practice question

A Hyperopt search space uses hp.choice to select among model options. After fmin finishes, the returned value for that choice is not the readable option the…

Exam-style question on Model Development from the free ML Associate practice test, with the answer and a full explanation below.

Updated November 10, 2026

Model Development

A Hyperopt search space uses hp.choice to select among model options. After fmin finishes, the returned value for that choice is not the readable option the engineer expected. What explains this behavior?

  1. AHyperopt returns the training loss for each choice label, and the user joins it back to the list of options by hand
  2. BHyperopt returns the raw Python object, but JSON serialization strips it out before the best result is displayed
  3. CHyperopt returns the index of the selected hp.choice branch, and space_eval maps that index back to the actual value
  4. DHyperopt rounds each categorical result to the nearest integer, and fmin handles numeric parameters alone internally
  5. EHyperopt stores string choices inside Trials attachments, and the best result is read back from the attachments by key
Answer & explanation

Correct answer: C

WHY C: Hyperopt's fmin returns the index of the selected hp.choice option, and space_eval can map that back to the actual configured value.

WHY NOT A: The returned value is the choice index, not a loss, and no join is involved.

WHY NOT B: The behavior is intentional, not a JSON serialization loss.

WHY NOT D: hp.choice supports categorical branches directly; nothing is rounded.

WHY NOT E: The choice value is recoverable with space_eval without relying on Trials attachments.

Take the full ML Associate practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Machine Learning Associate practice test. Take it and get a section-by-section score.

Start the free test →