Params, Metrics and Artifacts

The three things MLflow stores per run — and what belongs where.

0/3 done

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

  1. Logging the dataset size as a metric. It's a param — it does not change during the run.
  2. Logging per-epoch loss as a param. It's a metric with step=epoch.
  3. 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.

Analogy

Cooking analogy: params are the recipe ingredients (200g flour), metrics are the readings during cooking (oven temperature each minute), artifacts are the cake itself plus the photo and the receipt.

Reading in progress · 0 of 3 activities done