learntodriveai.dev/Machine Learning/Infrastructure Foundation: Serving and Experiment Tracking
Machine LearningProject 035 unitsVerified on 16 October 2026

Infrastructure Foundation: Serving and Experiment Tracking

Emeka OkaforHead of Customer Retention · Mobile network operator · Lagos, Nigeria
Email · from Emeka
Two things worry me. One: we didn't know the API was down until someone tried to use it.
Chat with Emeka

What you hand back

  • Input checks that reject out-of-range requests
  • Structured error messages naming field and constraint
  • A health check that reports model status
  • Model version on every prediction
  • Tracked, comparable MLflow experiment runs
  • Pinned, seeded setup that reproduces results

5 units

  1. Unit 1: The Reliability Problem

    Read Emeka's email about the outage, set up the project, and review the existing API's gaps.

    Open unit 1
  2. Unit 2: Input Validation and Error Handling

    Take validation ranges from the training data, build the input checks, and test them with curl.

    Open unit 2
  3. Unit 3: Health Checks and Model Versioning

    Build a health check that confirms the model is loaded, then simulate a missing model file.

    Open unit 3
  4. Unit 4: Experiment Tracking Infrastructure

    Set up MLflow logging, pin versions and seeds, and compare two model variants.

    Open unit 4
  5. Unit 5: Demonstration and Project Close

    Run the whole system together, send Emeka a summary, and write the README.

    Open unit 5
Read the full brief

You're building professional infrastructure around an existing churn prediction API -- input validation, health checks, model versioning, structured error handling, and experiment tracking as reproducible infrastructure.

The discipline skills: encoding training data constraints into Pydantic validation, designing health checks that verify model readiness (not just server uptime), attaching model versions to prediction responses, structuring error responses for callers, and configuring MLflow for reproducible experiments with pinned dependencies and random seeds.

The AI-direction lesson: the terrain shifts from data and training to infrastructure, and AI's failure modes shift with it. AI generates validation that checks type but not range -- a model trained on tenure of 1-72 months will accept tenure_months=-5. It generates health checks that always return 200 without checking whether the model is loaded. It logs hardcoded values to MLflow instead of actual variables. None of these produce errors. All of them silently fail. The new verification challenge is catching infrastructure code that looks thorough but lies about what it actually checks.

Your Role

You direct Claude Code through the infrastructure work. The model and data are familiar from P1-P2. What's new is the infrastructure layer around them -- validation, health checks, versioning, structured errors, and experiment tracking as reproducible infrastructure.

The data and model are settled. Your job is the reliability layer that makes the system professional.

What's New

Last time you built the full artifact creation pipeline: PRD, evaluation design, preprocessing, training, serving, documentation. You made the decisions about metrics and encoding.

This time the data and model are settled. The terrain shifts to reliability and reproducibility. You'll encounter AI generating infrastructure code that looks thorough but silently fails — validation that checks type but not range, health checks that always say "everything is fine," experiment logging that records hardcoded values instead of actual variables. Catching these failures is the new verification challenge.

Tools

  • Python — infrastructure code, validation models, health checks
  • FastAPI / uvicorn — serving (familiar, now enhanced)
  • Pydantic — input validation (new at this level of detail)
  • MLflow — experiment tracking as infrastructure (deepening from P2)
  • scikit-learn — model training (familiar)
  • Claude Code — AI direction
  • Git / GitHub — version control
  • curl — API testing

Materials

You receive:

  • Emeka's email about the API outage and his team's concerns
  • The P2 API code as a starting point (basic endpoint without infrastructure)
  • A data profile showing the training data's ranges and types (for validation boundaries)
  • The training dataset behind the model (data/subscribers.csv), for the experiment-tracking runs
  • A ticket breakdown covering all infrastructure work
  • A project governance file (CLAUDE.md)
Materials · 8 files
Start Project 3

You work at a computer with a terminal. Signed in, your place is saved.