Sub topic 2
The Data Model Every Tracker Shares
This chapter assumes basic Python, command-line use, and experience training a model with hyperparameters, validation metrics, and train/validation splits. It also assumes you know that a client can send requests to a server, usually through an API.
Experiment trackers use different names and interfaces, but they record nearly the same information. The central unit is a run: one execution of a training or evaluation script. A run connects the code, inputs, settings, results, and files needed to understand what happened.
The core objects
Most trackers organize runs inside an experiment or project. This is a named collection of related runs. For example, churn-model might contain every attempt to train a customer-churn classifier.
A run normally contains these fields:
| Object | Meaning | Example |
|---|---|---|
| Experiment or project | A group of related runs | `churn-model` |
| Run | One execution of a script | `baseline-2026-11-30` |
| Parameter | A setting chosen before or during training | `max_depth = 6` |
| Metric | A numeric measurement recorded during or after work | `val_auc = 0.91` |
| Tag | A label or searchable piece of metadata | `data_version = 2026-11-01` |
| Artifact | A file produced or used by the run | `model.pkl` |
A parameter describes a choice. Examples include learning rate, batch size, model type, and random seed. Parameters are usually treated as fixed for a run, although some trackers allow updates.
A metric describes an observed result. Examples include loss, accuracy, area under the ROC curve, and training time. A metric can be recorded once or as a series indexed by a step, epoch, batch, or timestamp.
A tag adds context that is useful for filtering. Tags can identify a branch, owner, dataset version, purpose, or status. Unlike a numeric metric, a tag is not intended for plotting a learning curve.
An artifact is a file or directory associated with a run. Artifacts can include model weights, plots, evaluation reports, feature samples, logs, and configuration files. A tracker usually stores artifact metadata in its database and the file contents in an artifact store.
How a run is recorded
The following MLflow example creates one run, records two parameters, logs a metric series, and adds a tag:
import mlflow
mlflow.set_tracking_uri("http://127.0.0.1:5000")
mlflow.set_experiment("churn-model")
with mlflow.start_run(run_name="baseline"):
mlflow.log_param("max_depth", 6)
mlflow.log_param("learning_rate", 0.1)
for step, auc in enumerate([0.84, 0.88, 0.91]):
mlflow.log_metric("val_auc", auc, step=step)
mlflow.set_tag("data_version", "2026-11-01")The with block defines the run's lifetime. The first metric has step 0, and the last has step 2. A user interface can plot these points as a validation curve.
The tracking server also records system metadata such as the run identifier, start and end times, source code location, user, host, and run status. These fields help distinguish a failed run from a completed run and help reproduce an old result.
Relationships and reproducibility
Think of a run as a record with links rather than as a flat spreadsheet row:
A useful run should answer four questions:
- What code and data produced the result?
- Which parameters and environment were used?
- How did the metrics change during execution?
- Where are the model and supporting files?
Track the dataset version, code revision, random seed, and evaluation procedure when they affect the result. A run that records only the final score is difficult to reproduce and easy to misinterpret.
Common modeling errors
Do not confuse an experiment with a run. The experiment groups runs; it does not represent one training execution.
Do not store every value as a parameter. Parameters describe inputs or choices. Training loss recorded after every batch belongs in a metric series.
Do not use tags as a replacement for structured metadata. A tag such as notes="changed preprocessing and seed" is harder to query than separate fields for preprocessing_version and seed.
Do not assume that two trackers define “step” identically. One tool may use an explicit integer, while another may use a framework's global step or timestamp. Confirm the behavior before comparing curves.
Exercise
A training run uses learning rate 0.01, records validation loss after each of 20 epochs, labels the run candidate, and saves a confusion-matrix image. Which data-model object should hold each item?
Show answer
Store the learning rate as a parameter, the validation-loss values as a metric series indexed by epoch, candidate as a tag, and the image as an artifact.