OphirCloud Academy

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.

commitbuildtestdeploy→→→A red stage stops the next one — without anyone remembering to check.
The pipeline lives in the repository, so it is reviewed and versioned with the code it ships.

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.

CommandWhy
echo 'scikit-learn==1.5.2' >> requirements.txtA pinned learner. Unpinned versions make old runs unrepeatable.
dvc initCreates the metadata that turns a repository into a data-versioned one.
dvc add data.csvHash the data, commit the hash, keep the bytes out of git.
dvc remote add -d storage s3://ophir-dvcWhere the bytes actually live, so another machine can pull them.
echo 'mlflow.log_metric("accuracy", 0.87)' >> train.pyThe number a comparison will be made on, recorded at run time.
echo ' mlflow.register_model("runs:/baseline/model", "churn-model")' >> train.pyA 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.

  • 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

    Open the lab

MLOps foundations · OphirCloud Academy · all lessons