You want to log a confusion matrix image, a dictionary of thresholds and a per-epoch loss curve. Which calls fit?
- Exam domain
- Model Development44% of the exam
- Difficulty
- Medium
- In this mock
- 22 questions on this domainPractise this domain
Why the exam asks this
Model Development (44% of the exam)
Objective in the exam guide: Log custom metrics, parameters, and artifacts programmatically in MLflow to track advanced experimentation workflows.
Logging custom metrics, parameters and artifacts is named.
Why B is the answer
log_figure, log_dict, and log_metric with step
log_figure and log_artifact store images, log_dict stores structured data, and log_metric with step builds a curve.
Remember: Use the right log call per type.
How it works
MLflow has typed logging calls.
In detail
- Figures and files as artifacts.
- step builds metric history.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Print them and rely on the driver logWrong
Logs are not tracked.
B. log_figure, log_dict, and log_metric with stepRight
Use the right log call per type.
C. Save them only in a notebook cell outputWrong
Cell output is not tracked.
D. mlflow.log_param for all three, since parameters accept any Python objectWrongMost tempting
Params are short strings.
Why it tempts: Params look like a catch-all.
Use case
An illustrative scenario, not a real incident.
Illustrative: every run stores its confusion matrix and a thresholds JSON.
See it in different ways
mindmap
root(("MLflow run"))
n1["Images"]
n2["log_figure"]
n3["log_artifact"]
n4["Structured"]
n5["log_dict"]
n6["Curves"]
n7["log_metric with step"]How to read this chart
- The centre is "MLflow run".
- "Images" covers "log_figure", "log_artifact".
- "Structured" covers "log_dict".
- "Curves" covers "log_metric with step".
sequenceDiagram participant P0 as Training code participant P1 as MLflow P0->>P1: log_metric loss step=epoch P0->>P1: log_figure confusion matrix P0->>P1: log_dict thresholds
How to read this chart
- 1. Training code sends "log_metric loss step=epoch" to MLflow.
- 2. Training code sends "log_figure confusion matrix" to MLflow.
- 3. Training code sends "log_dict thresholds" to MLflow.