Reproducibility is the product
MLOps foundations
A model you cannot rebuild is a demo. MLOps is the discipline of pinning the environment, versioning the data separately from the code, and recording every run so a result can be explained later.
Three things to pin
Environment (pinned requirements, a venv or image), code (a commit), and data (a content hash). Miss any one and 'the same training run' becomes a wish.
Data does not belong in git: it is large and binary. DVC stores a hash in the repository and the bytes in a cache or remote, so a commit identifies the exact dataset without bloating history.
Runs are records
MLflow gives each execution a run: parameters in, metrics out, artefacts attached. Without that, comparing two attempts is memory and argument.
Registering a model adds the missing half of a deployment: a name and a version that serving can reference, instead of a filename on someone's laptop.
Commands in this lesson
Every one of these runs in the sandbox — no real account, no real bill.
| Command | Why |
|---|---|
echo 'scikit-learn==1.5.2' >> requirements.txt | A pinned learner. Unpinned versions make old runs unrepeatable. |
dvc init | Creates the metadata that turns a repository into a data-versioned one. |
dvc add data.csv | Hash the data, commit the hash, keep the bytes out of git. |
dvc remote add -d storage s3://ophir-dvc | Where the bytes actually live, so another machine can pull them. |
echo 'mlflow.log_metric("accuracy", 0.87)' >> train.py | The number a comparison will be made on, recorded at run time. |
echo ' mlflow.register_model("runs:/baseline/model", "churn-model")' >> train.py | A versioned name that serving can point at. |
Now do it
Reading the model makes the first attempt faster. Only the lab makes you able to do it.
- Open the lab
MLOps: A Reproducible Training Package
Intermediate · 20 min · members
- Open the lab
MLOps: Version a Dataset with DVC
Intermediate · 25 min · members
- Open the lab
MLOps: Track an Experiment with MLflow
Intermediate · 30 min · members
MLOps foundations · OphirCloud Academy · all lessons