CourseAI / ML Engineer: The Complete Course · Module 4: Deep Learning · part 28 of 93
Part 28 · Module 4: Deep Learning

Lesson 4: Frameworks: PyTorch, Lightning and a run you can repeat

31 min read·
Module 4 · Lesson 4 · About 50 minutes · Needs: lessons 1 to 3 (a training step, a training loop, the message model), and the Kestrel data (course-guide/06). GPU optional.

The situation

Week 4 at Kestrel, day five. The networks work, but each lesson wrote its own loop, and Adaeze's standing question applies to networks too: "Can you reproduce last month's model exactly?" Before the Module 4 lab compares a network with model v1, the training code must load data the same way every time, train the same way every time, and say what it ran on.

Running examples: parcel KP0104204 (simulated), item 18,189 of the validation set, and message M0001, 12 words long.

WHERE THIS FITS The Kestrel system this lesson SHARED SERVICES Depot scans parcels, routes Ingestion nightly batch Validation Pandera checks Data lake Parquet, DuckDB Experiments MLflow runs Training LightGBM, Optuna Online store Feast, Redis Features point in time Gates vs the champion Registry staged versions Serving API FastAPI, ONNX Consumers vans, customers Retraining trigger, budget Alerting on call Monitoring drift, Evidently Late labels a day later Orchestrator Prefect flows Versions DVC, Git CI/CD GitHub Actions Containers Docker images
This lesson makes training runs repeatable (blue): datasets, the training framework and the seeds and versions every later run records.

The rest of this course is yours to keep

This course is bought on its own, once, and stays readable afterwards, including the parts added to it later.

Or open everything with a plan