Experiment parameters metrics and artifacts
Quick answer
Experiment tracking records what was attempted, which data and code were used, and what happened. A run is one execution within an experiment; a parameter describes configuration, a metric measures an outcome, a tag supplies context, and an artifact is a retained file. Examples use standard-library Python unless marked native MLflow, which is syntax-checked only. ByteMind execution is unverified.
Group a run record
run={"params":{"alpha":1},"metrics":{"val_mae":2.5},"tags":{"split":"v1"}}print(run["params"]["alpha"],run["metrics"]["val_mae"])Expected output (locally tested): 1 2.5. Configuration and observed performance have different roles.
How it works
For a regression experiment, log alpha as a parameter, validation MAE as a metric, dataset revision as a tag, and a sanitized residual summary as an artifact. Keep metric names, units, split identifiers and aggregation conventions consistent. A metric history can contain several values indexed by training step; distinguish the last value from the best validation checkpoint. Parameters describe a run rather than an evolving measurement; start a fresh run for a different configuration. Record failures as well as successes. Hash the actual bytes of code, data and configuration with SHA-256; a path or mutable filename is not a version. A hash establishes byte equality, not the trustworthiness or license of the contents. Do not store secrets, personal records, credentials or uncontrolled logs in tags or artifacts. Record only allowlisted fields and sanitized summaries; hashing personal data does not anonymize it. Keep experiment comparison separate from deployment decisions.
Hash exact bytes
from hashlib import sha256a=b"x,y\n1,2\n"print(sha256(a).hexdigest()==sha256(a+b"\n").hexdigest())Expected output (locally tested): False. A newline changes the byte identity.
Common mistakes
Do not use test scores to pick a model, compare training and validation metrics as if equivalent, or record only favorable runs.
Practice and next steps
Create two hypothetical ridge runs with different alpha values; identify one parameter, one metric, one tag and one safe artifact for each.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Experiment parameters metrics and artifacts — knowledge check
Apply experiment parameters metrics and artifacts to small examples and debugging scenarios.
Which is a parameter?
Which is an artifact?
Does a SHA-256 match prove provenance?
Which step wins if validation error ties?
What about failed runs?