Course contentsShow
← Machine Learning and Deep Learning
Lesson 2820 of 3,53861. Experiment Tracking and Model ManagementFree lesson

MLflow Experiment Logging

Using MLflow to log parameters, metrics, tags, and artifacts with runs nested under experiments.

MLflow Experiment Logging

What you'll learn: How to systematically log parameters, metrics, tags, and artifacts within MLflow runs organized under experiments.

The Core Idea

Think of MLflow experiments like laboratory notebooks—each experiment is a collection of related trials (runs), and each run records everything about that specific trial. When you train a model, you create a run that captures hyperparameters, performance metrics, metadata tags, and output files (artifacts). These runs nest under experiments that group related work together.

The Four Pillars of MLflow Logging

Parameters

Log your hyperparameters and configuration values—learning rate, batch size, model architecture choices. These are inputs to your training process.

Metrics

Track performance values that change during training—loss, accuracy, F1 score. You can log metrics at each step or epoch to visualize learning curves.

Tags

Add metadata like "model_type", "dataset_version", or "experiment_owner". Tags help you search and filter runs later.

Artifacts

Save actual files—trained models, plots, confusion matrices, preprocessed datasets. Artifacts are the outputs you'll want to retrieve later.

The Organizational Hierarchy

Experiments serve as logical containers. You might have separate experiments for "baseline_models", "architecture_search", or "production_candidates". Each contains multiple runs representing different training attempts with varying configurations.

This structure makes it trivial to compare dozens of training runs side-by-side, filter by tags, and identify which hyperparameter combinations worked best—all without manually naming files or maintaining spreadsheets.

Key Takeaway: MLflow experiment logging creates a structured hierarchy where runs (individual training attempts) nest under experiments (related work), with each run capturing parameters, metrics, tags, and artifacts for complete reproducibility and comparison.