0Pricing
MLOps Academy · Lesson

Log Params, Metrics, and Artifacts

Capture hyperparameters, scores, and files per run.

Log Params, Metrics, and Artifacts is a free MLOps Academy lesson on CoddyKit — lesson 2 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the MLOps Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Three Things to Log

Inside a run you capture three kinds of data: the parameters you chose, the metrics you measured, and the files you produced.

Log a Parameter

A parameter is an input you picked, like learning rate or tree depth. Log it once so you always know how a run was configured.

mlflow.log_param("learning_rate", 0.01)

Log Many Params at Once

Got a whole config dict? Use log_params to record every key and value in one call instead of writing them line by line.

mlflow.log_params({"max_depth": 6, "n_estimators": 200})

Log a Metric

A metric is a number your model earned, like accuracy or loss. Log it so runs can be ranked and compared later.

mlflow.log_metric("accuracy", 0.92)

Metrics Can Have Steps

Metrics change over training. Pass a step to log loss at each epoch, and MLflow draws a curve you can inspect in the UI.

for epoch in range(10):
    mlflow.log_metric("loss", loss, step=epoch)

What an Artifact Is

An artifact is any file a run produces: a saved model, a plot, a confusion matrix image, or a CSV of predictions.

Log an Artifact

Use log_artifact to attach a local file to the run. MLflow copies it to the artifact store so it stays tied to that experiment.

mlflow.log_artifact("confusion_matrix.png")

Params vs Metrics

The rule of thumb: a param is an input you control, a metric is an output you measure. Logging both makes runs fully comparable.

Tag Your Runs

Add a tag to label a run with free-form notes, like the data version or who triggered it. Tags make later searching far easier.

mlflow.set_tag("data_version", "v3")

It All Lives in the Run

Every param, metric, and artifact attaches to the active run. Close the run and that snapshot is frozen forever for you to revisit.

Log Early, Log Often

Cheap to log, painful to lose. Capture everything that might matter, because you can never reconstruct a run you failed to record.

Quick Check

Let us check that you can tell params from metrics.

Recap

You logged params, metrics with steps, artifacts, and tags. A run now holds its full story, ready to compare against the rest. ✅

Frequently asked questions

Is the “Log Params, Metrics, and Artifacts” lesson free?

Yes — the full text of “Log Params, Metrics, and Artifacts” is free to read here on the web, and the MLOps Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the MLOps Academy course, upgrade to CoddyKit PRO.

What will I learn in “Log Params, Metrics, and Artifacts”?

Capture hyperparameters, scores, and files per run. You practise MLOps Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start MLOps Academy?

No prior experience is required. MLOps Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 2 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Log Params, Metrics, and Artifacts” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this MLOps Academy lesson?

Yes. Every MLOps Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Install MLflow and Start Tracking
  2. Log Params, Metrics, and Artifacts
  3. Compare Runs in the MLflow UI
  4. Autolog with One Line of Code
← Back to MLOps Academy