Deep Learning & MLOps · Module 07
MLflow Basics
The shared baseline for every project: log a run with MLflow, read it in the UI, register a model, and record which dataset version the run used.
Học xong bạn làm được
- Log parameters, metrics and artifacts for a run
- Compare runs in the MLflow UI
- Register a model version
- Record dataset lineage on a run
Bài học
- Logging a run
Every group uses MLflow - it is the baseline, not one group's tool - and this module covers just enough to log your own project's runs properly. Each mlflow.start_run() block produces one run manifest; log_param records a hyperparameter, log_metric a result and log_artifact attaches a file. The discipline is calling them consistently for every run you care about, not only the ones that went well.
- Reading the UI
mlflow ui starts a local web UI (default http://localhost:5000) listing every run, sortable and filterable by parameter or metric. The habit to build now - before starting a new experiment, look at what you already tried; it is far cheaper than re-running a configuration you forgot you tested.
- Model Registry, briefly
The registry sits on top of runs and tracks named model versions through stages - Staging (a candidate under evaluation), Production (serving traffic, and sealed per MLOps Principles), Archived (retired, kept for rollback and audit, not deleted). You will not run a real promotion workflow in this track; know the vocabulary.
- Recording dataset lineage
The one MLflow feature this module insists on, because Baseline Integration requires it - mlflow.data.from_pandas plus mlflow.log_input attaches to the run exactly which dataset (and version) it consumed. That is dataset lineage made concrete, so the manifest answers "which data produced this number?". The module closes with autolog, pyfunc, SageMaker Experiments and review questions.
- Baseline Integration
Every group does this, inside their own deep learning project — this is not a separate exercise, it’s the piece that connects MLOps Principles to code you already have running.