Single logo
  • Courses
  • Blog
  • About
Join for freeJoin free
Machine Learning
  • First Look at a Dataset: 6 Checks Before You Plot or Model
  • Plotting Distributions with seaborn: Histograms, KDE, Counts and log1p
  • Scatter Plots and Pair Plots: See How Two Columns Relate
  • Finding Outliers: Box Plots, Violin Plots and the IQR Rule
  • Correlation and Heatmaps: Covariance, df.corr() and What They Miss
  • Train-Test Split and Data Leakage: Split First, Learn After
  • Handling Missing Data: Count the Blanks, Then Fill Them with SimpleImputer
  • Encoding Categorical Data: OrdinalEncoder, OneHotEncoder and LabelEncoder
  • Feature Scaling: StandardScaler, MinMaxScaler and Which Models Care
  • Pipelines and ColumnTransformer: All Preprocessing and the Model in One Object
  • Feature Selection and the Curse of Dimensionality: Keep the Columns That Matter
  • Project: Preprocess Rain in Australia from Raw CSV to Model-Ready Data
    Regression
    • Linear Regression and the Cost Function: Draw a Line, Score It
    • Gradient Descent Explained: Feel the Slope, Step Downhill
    • Linear Regression in scikit-learn: Fit, Predict and Read the Price Tags
    • Regression Metrics: MAE, RMSE, R-squared and the Baseline to Beat
    • Polynomial Regression, Overfitting and Underfitting: Bend the Line, Watch the Test Score
    • Regularisation with Ridge and Lasso: Put a Price on Big Weights
    Classification and Evaluation
    • Logistic Regression and the Sigmoid: Score, Squash, Decide
    • Logistic Regression in scikit-learn: predict, predict_proba and Softmax
    • Why Accuracy Lies: The Confusion Matrix, Baselines and Type I/II Errors
    • Precision, Recall and F1 Score: Two Questions and One Balance
    • ROC Curve, AUC and Choosing a Classification Threshold
    • Handling Imbalanced Data: class_weight, SMOTE and the Resampling Leak
    • Cross-Validation: KFold, StratifiedKFold, cross_val_score and cross_validate
    Classic Algorithms
    • K-Nearest Neighbours (KNN): Distance, k and Why Scaling Is a Must
    • Naive Bayes: Prior Times Likelihood, a Spam Filter by Hand and GaussianNB
    • Support Vector Machines (SVM): The Widest Road, C, Kernels and gamma
    • Decision Trees: Gini, max_depth and Feature Importances on Rain in Australia
    • Bagging and Random Forest: Many Shaky Trees, One Steady Answer
    • Boosting: Residuals by Hand, AdaBoost, Gradient Boosting and XGBoost
    • Voting and Stacking: Does a Team of Models Beat the Best One?
    Model Selection and Tuning
    • Hyperparameter Tuning with GridSearchCV and RandomizedSearchCV
    • Which Features Matter? Feature Importances, Permutation Importance and SHAP
    • Project: The Classification Master Template, from Raw CSV to a Saved Model
    • K-Means Clustering: Find Groups in Data With No Labels
    • Choosing k for K-Means: the Elbow Method and the Silhouette Score
    • Hierarchical Clustering and DBSCAN: Dendrograms, Linkage, eps and Noise
    • Dimensionality Reduction with PCA: 13 Columns Down to 2
    • Association Rules and Market Basket Analysis: Support, Confidence, Lift and Apriori
    • Recommender Systems: Item-Based Collaborative Filtering with Cosine Similarity
    • Bag of Words with CountVectorizer: Turn Text into Word Counts
    • TF-IDF with TfidfVectorizer: Common Words Fade, Rare Words Speak
    • Build a Text Classifier with TF-IDF and a Pipeline: Naive Bayes vs LinearSVC
    • Why Neural Networks: Pixels, One Neuron and Layers
    • The Forward Pass and Activation Functions: ReLU, Sigmoid, Tanh and Softmax
    • Loss and Backpropagation: How Wrong, and Who Is to Blame
    • The Training Loop: Epochs, Mini-Batches, Learning Rate and Optimisers
    • Your First Neural Network with Keras: MNIST Digits at 97.7%
    • The Same Network in PyTorch: DataLoader, nn.Module and the Five-Line Training Loop
    • Convolutional Neural Networks (CNN) Basics: Filters, Feature Maps and Pooling
    • Embeddings: Words as Vectors, Cosine Similarity and nn.Embedding
    • Similarity Search: Finding the Closest Vectors with NumPy and NearestNeighbors
    • Dropout, Early Stopping and Batch Norm: Judge Each One by the Validation Curve
    • Transfer Learning on Images: A Frozen ResNet-18, a Small Head and an Honest Baseline
    • Attention Explained Without the Maths: Query, Key, Value and the Word "it"
    • Transformer Building Blocks in PyTorch: Follow the Shapes Through Attention and a Block
    • Pretrained Models from Hugging Face: A Sentiment Pipeline and Sentence Embeddings on a CPU
    • Loading a Language Model and Running Inference: Download, Load, Tokenize, Generate
    • Model Size and Memory: Parameters x Bytes, Quantization, and Where to Run a Model
    • Training on a GPU: Mixed Precision, Gradient Accumulation and Checkpoints That Really Resume
    • When NOT to Fine-Tune: A Decision Tree of Prompt, RAG, Tools, Then Fine-Tuning
    • Full Fine-Tuning vs LoRA vs QLoRA: What Each One Changes and What It Costs
    • LoRA Fine-Tune of a Tiny Model: Teach SmolLM2-135M Your House Style on a CPU
    • Knowledge Distillation: Teach a Model 100 Times Smaller From a Teacher's Soft Labels
    • Serving Open Models: Continuous Batching, vLLM and Cold Starts
      Engineering Basics
      • Python Virtual Environments: One Project, One Toolbox
      • Git and GitHub Fundamentals: Commits, Branches, Push and Pull
      • Testing a FastAPI App with pytest: Three Small Tests
      • Config and Logging Instead of Hard-Coded Values in ML Training
      • SQL Essentials for Python: SELECT, WHERE, JOIN and GROUP BY
      Data and Features in Production
      • Time Splits and Group Splits: Make the Split Match How the Model Is Used
      • Time Series Basics: Lags, Rolling Windows and Walk-Forward Backtesting
      • Feature Engineering Patterns, Each One Tested: Date Parts, Differences, Windows and Target Encoding
      • Point-in-Time Correctness: Join Features as of Each Event with merge_asof
      • Data Validation and Schema Checks: Stop Bad Input Before It Reaches the Model
      • Training-Serving Skew: Same Model, Different Inputs, and How to Detect It
      • Feature Stores: Offline and Online Stores, and When You Actually Need One
      • Data Versioning with DVC: Tie Every Model to the Exact Data That Trained It
      Experiments and Model Quality
      • MLOps in One Picture: Code, Data, Model and the Lifecycle Loop
      • Experiment Tracking with MLflow: Log Params, Metrics and the Model, Then Compare Runs
      • MLflow Model Registry Aliases: Serve the Champion, Ship a New Version and Roll Back in One Line
      • The Cost of Being Wrong: Baselines, a Price per Mistake and the Cheapest Threshold
      • Probability Calibration: Can You Trust the 0.8? Reliability Curves, Platt and Isotonic
      • Slice Evaluation and Fairness Checks: Score the Model Group by Group
      Serving Models
      • Saving and Loading Models with joblib: One Pipeline, One File
      • FastAPI Hello World: Routes, uvicorn and the Free Swagger Page
      • Deploy a Machine Learning Model with FastAPI: POST /predict for a Saved Model
      • Docker Essentials for ML: Images, Containers and Volumes with a Model API
      • Containerising a Model API: A Dockerfile for FastAPI and scikit-learn, Line by Line
      • Online, Batch or Streaming? Picking the Serving Pattern for an ML Model
      • A Production FastAPI for an ML Model: Input Limits, /health, /ready and a Model Version
      • Batch Scoring a Million Rows: Chunks, a Run ID and a Safe Rerun
      • Latency Math: p50, p95, p99 and Why the Tail Reaches Your Users
      • Measuring Latency of an ML API: Timing Inside with OpenTelemetry, Outside with a Load Test and Locust
      • Making ML Inference Fast: ONNX, Micro-Batching and Quantisation, Measured
      • Sizing and Autoscaling an Inference Service: From One Replica to a Replica Count
      Pipelines, CI/CD and Cloud
      • The Training Pipeline as a DAG: Steps, Files, Retries and a Safe Rerun
      • Orchestrating ML Pipelines with Airflow: Schedule, Retries and Backfill
      • Retries and Backoff for Reliable Tasks: Retry What Heals, Wait Longer, Add Jitter, Set Limits
      • CI with GitHub Actions: Run the Tests and Build the Docker Image on Every Push
      • CI/CD for ML: A Quality Gate That Blocks a Weaker Model, Even When Every Test Passes
      • Which Cloud for What: AWS, Azure, Google Cloud, GPU Clouds, Edge and Platforms
      • IaaS, PaaS, Containers or Serverless? Choosing Where a Model API Runs
      • Kubernetes at a High Level: Pods, a Deployment and a Service for a Model API
      • Managed ML Platforms: What SageMaker, Vertex AI and Azure ML Give You, and Tie You To
      • Deploying a Model API to AWS: ECR, Secrets Manager, CloudWatch and Fargate, Then Teardown
      • Cloud Cost Thinking for ML: Size x Count x Hours x Rate, and Three Decisions Worth Ten Times
      Monitoring and Release
      • Monitoring Drift and Retraining: When a Model Gets Worse With No Code Change
      • Drift Detection in Code: PSI Bin by Bin, the KS Test, Evidently and a Measured Threshold
      • Shadow, Canary and Rollback: Releasing a New Model Without Betting Everything on It
      • A/B Tests for Models: Did the New Model Make Things Better for People?
      • When Labels Arrive Weeks Late: What to Watch Before You Can Grade the Model
      • Retraining Triggers: Schedule, Drift and Performance, Wired to One Retrain Pipeline
      • The User Feedback Loop: Why Thumbs Up Isn't the Truth, and What a Small Random Review Adds
      • Debugging a Model in Production: A Four-Step Runbook, Cheap Checks First
      • Project: Car Price Predictor End to End, from CSV to a FastAPI Price API
      1. Blog
      2. /
      3. Machine Learning
      4. /
      5. MLOps and Production ML

      MLOps in One Picture: Code, Data, Model and the Lifecycle Loop

      The whole of MLOps in plain words: why notebooks forget, the three things that change in ML (code, data, model), the seven-station lifecycle loop, how MLOps differs from DevOps, and drift shown on a sample of support tickets.

      Chaand Sheikh

      ·27 November 2026Experiments and Model Quality

      What you will learn

      • Explain why a notebook alone cannot answer which data, settings and model are live
      • Name the three things that change in ML: code, data and model, and how each is recorded
      • Walk the seven-station lifecycle loop from data to retrain
      • Describe drift and why a model needs monitoring after launch

      Before you start

      • Training a scikit-learn model
      • Git and GitHub Fundamentals

      You've trained a model and it works in a notebook. That's a great start, but it's only the start. This article gives you the whole picture of MLOps in plain words, before we touch any tool: how teams keep a model trackable, repeatable and correct.

      There are four jobs to keep in mind: track, register, serve and monitor. Don't worry about the names yet. We'll meet each one slowly.

      One month later: three questions

      Say you built a ticket priority model. It reads a support ticket and says whether its priority is low or high. In the notebook, it works nicely.

      One month passes, and your manager walks in with three questions:

      1. Which data trained the model that's live right now? This file, or the older one? Which version?
      2. Which settings gave us that good score? You edited that one cell about ten times. Which value was the final one?
      3. Is the model still right this month? Maybe, maybe not. Nobody has checked since launch day.

      The root cause is simple: notebooks forget. They don't keep a record of what you used, and they don't watch the model for you. MLOps is how we stop forgetting.

      A bakery chain: three things change, not one

      Think of a bakery chain. The bread tastes great in your city, and now you want to bake the same bread in another city. What do you need?

      BakeryIn ML
      The recipeThe code: the steps that train the model
      The flour batchThe data: different flour, different bread
      The oven settingsThe trained model and its settings
      The daily taste testChecking the model's results every day, not only on launch day

      Here's the difference from normal software. In normal software, mostly one thing changes: the code. In ML, three things change: code, data and model. Write down only one of them and you can't bake the same bread again.

      The lifecycle wheel

      Put it together and you get one picture: a wheel with seven stations.

      The MLOps lifecycle wheel 1. Data 2. Train 3. Evaluate 4. Register 5. Deploy 6. Monitor 7. Retrain one loop, not a straight line Retrain sends you back to Data. Monitoring feeds the next lap.
      The MLOps lifecycle: seven stations in a loop. Retrain sends you back to data, so the work never ends at deploy.
      1. Data: collect the tickets and prepare them.
      2. Train: teach the model from that data.
      3. Evaluate: test the model on tickets it has not seen, and look at the score.
      4. Register: if it's good enough, save it with a name and a version number, like a shelf in a store room.
      5. Deploy: the model goes live behind an API, so other apps can use it.
      6. Monitor: watch the live results and the live data, like the daily taste test.
      7. Retrain: when the model gets old, train it again on fresh data.

      Retrain sends us back to data, so it's a loop, not a straight line. Seven stations, one loop, and monitoring is what feeds the next lap.

      Three things, three versions

      So how do we record the three things?

      What changesExampleHow we record it
      Codethe training scripta Git commit
      Datathe tickets filethe dataset file name plus a hash or a version
      Modelthe trained priority modelan MLflow run and a model registry version

      The code goes into Git, and every change becomes a commit (see Git and GitHub Fundamentals). A data file can change quietly, so you record its name together with a hash: a short fingerprint of the file. Change one row and the fingerprint changes. For the model, an MLflow run stores the settings and the score, and a registry version is the numbered shelf for the finished model.

      Write down all three, and any past result can be rebuilt. That's the whole idea of tracking.

      DevOps vs MLOps

      If you know DevOps already, the comparison helps:

      QuestionDevOpsMLOps
      What you shipcodecode + data + model
      Testsunit testsunit tests, plus metrics on a test set
      When it breakson a bugon a bug, and when the world changes (drift)
      Rollbackthe previous buildthe previous model version

      A model can pass every unit test and still give poor answers, which is why the metric check sits on top. In short, MLOps is DevOps plus data, metrics and drift.

      One tool per job

      Keep the toolbox small, one tool for each job:

      • Track and register: MLflow keeps every training run and every model version.
      • Serve: FastAPI and Docker put the model behind an API, inside a container (Deploy a Model with FastAPI).
      • Automate: GitHub Actions retrains the model and runs the tests whenever something changes.
      • Monitor: a drift report compares the live data with the training data and tells you when they move apart.

      Tools change often, but the loop stays the same. Understand the loop and you can pick up any new tool quickly.

      Drift in one picture

      Here is the share of tickets by channel in our sample data: chat, email and phone.

      Drift: share of tickets by channel, training data vs a newer batch 30% 58% Chat 38% 25% Email 32% 17% Phone training data newer batch
      Sample ticket data. In training, chat was 30% of tickets. In a newer batch it's 58%, while email and phone shrank.

      In the training data, chat is only 30% of the tickets, email 38% and phone 32%. In a newer batch, chat is 58%, email dropped to 25% and phone to 17%. The customers moved to chat.

      The model didn't change at all. The world did. A model trained mostly on email and phone tickets may now be wrong on chat tickets, and no error message will tell you. That's why we monitor.

      Common mistakes

      • Versioning only the code. The same script on a different data file gives a different model. Record all three.
      • Treating deploy as the finish line. Deploy is station five of seven. Without monitoring you won't know when the model goes stale.
      • Trusting unit tests alone. They check that the code runs, not that the answers are good. Check metrics on a test set too.
      • Learning tools before the loop. The tool names change every few years. The seven stations don't.

      Recap

      IdeaIn one line
      Why MLOpsNotebooks forget which data, settings and model you used
      Three things changeCode (Git), data (name + hash), model (MLflow run + registry version)
      The loopData, train, evaluate, register, deploy, monitor, retrain
      MLOps vs DevOpsDevOps plus data, metrics and drift
      DriftThe world changes under a model that didn't

      Try it yourself

      Take the last model you built. Write down its three versions: the code, the data and the model. Then pick one metric you'd watch every week. The next step is to make the computer write that record for you: Experiment Tracking with MLflow.

      Built this? Share your solution in the StudyEasy AI Community.

      Join free on Skool →
      ← Previous
      Data Versioning with DVC: Tie Every Model to the Exact Data That Trained It
      Next →
      Experiment Tracking with MLflow: Log Params, Metrics and the Model, Then Compare Runs
      Single logo

      StudyEasy AI Community

      Hosted onSkool

      Learn AI engineering, share what you build, and connect with other learners.

      • Free resources: lesson files, notebooks and code

      • Ask questions and join engineering discussions

      • Meet real people learning and building with AI

      Join free on Skool
      Go deeper with a course

      Machine Learning Engineer: From First Model to ML Engineer

      Learn machine learning in Python, then ship it: data analysis, regression, classification, tuning, deployment and MLOps.View on Udemy ↗: Machine Learning Engineer: From First Model to ML Engineer (opens in a new tab)

      Related articles
      Python Virtual Environments: One Project, One Toolbox

      Why every Python project gets its own virtual environment: two projects that need different versions of requests, python -m venv .venv, activation, pip install and the PyCharm setting that activates it for you.

      Git and GitHub Fundamentals: Commits, Branches, Push and Pull

      The Git you use every day, on a tiny hello-ml project: commits as save points, the staging area, a branch merged with a fast-forward, then push, clone, pull and pull requests with a teammate.

      Testing a FastAPI App with pytest: Three Small Tests

      A tiny FastAPI app with a Hello World route and a name route that refuses numbers, three pytest tests that check it, and what happens when the validation is deleted by mistake.

      Config and Logging Instead of Hard-Coded Values in ML Training

      Take the hard-coded values out of a car price training script: one config.toml read with tomllib, logging with levels and a run id on every line, and secrets read from the environment. Same RMSE, 2195, before and after.

      On this page
      • One month later: three questions
      • A bakery chain: three things change, not one
      • The lifecycle wheel
      • Three things, three versions
      • DevOps vs MLOps
      • One tool per job
      • Drift in one picture
      • Common mistakes
      • Recap
      • Try it yourself
      Single logo

      StudyEasy AI Community

      Hosted onSkool

      Learn AI engineering, share what you build, and connect with other learners.

      • Free resources: lesson files, notebooks and code

      • Ask questions and join engineering discussions

      • Meet real people learning and building with AI

      Join free on Skool
      Go deeper with a course

      Machine Learning Engineer: From First Model to ML Engineer

      Learn machine learning in Python, then ship it: data analysis, regression, classification, tuning, deployment and MLOps.View on Udemy ↗: Machine Learning Engineer: From First Model to ML Engineer (opens in a new tab)

      Single logo

      Empowering Education, One Course at a Time

      About
      About usContact usFAQs
      Legal
      Terms of ServicePrivacy Policy

      © 2026 StudyEasy Organization. All rights reserved.