Inputs, measurements, files
A simple rule
- Param = an input to training that does not change during a run.
- Metric = a measurement that may change during a run (per epoch / step).
- Artifact = a file the run produces (the model, plots, the confusion matrix, the SHAP report).
Common mistakes
- Logging the dataset size as a metric. It's a param — it does not change during the run.
- Logging per-epoch loss as a param. It's a metric with
step=epoch. - Logging the model file as a metric. It's an artifact.
Step-aware metrics
for epoch in range(epochs):
mlflow.log_metric('train_loss', loss, step=epoch)
mlflow.log_metric('val_loss', v_loss, step=epoch)
The MLflow UI then renders proper learning curves automatically.