CourseAI / ML Engineer: The Complete Course · Module 2: Software and Systems Engineering · part 16 of 93
Part 16 · Module 2: Software and Systems Engineering

Lab: Kestrel as an installable, tested package

40 min read·
Module 2 · Lab · About 45 minutes · Needs: lessons 1 and 2 of this module, and the Module 1 lab (or nothing: Step 1 rebuilds Module 1)

What you are building

Kestrel as a package Installed once, run from anywhere Active flow Background or async 1 Processing step number Optional or fallback The repository kestrel/ Modules 1 and 2 pyproject.toml version 0.2.0 tests/ 13 tests Install pip pip install -e . linked, not copied Who runs it python -m kestrel.cli make test Dockerfile not built here ci.yml runs on GitHub 1 2
The repository becomes a package installed with pip install -e . (gold), run from a terminal and by make test (green and teal); the Dockerfile and the CI workflow are written but run only on your own computer and on GitHub (dashed).

Tomasz's team will run Kestrel's code from scheduled jobs, not from a notebook, and Rhys will build an image from it. Both need the same thing: a package that installs with one command, a way to call it from a terminal, and a test suite that says green or red. The lessons wrote the pieces; this lab joins them in the repository.

The lab puts the lessons' ten files into the repository unchanged, installs the package with pip install -e ., adds kestrel/cli.py (Kestrel from a terminal), a Makefile with the commands everyone runs, and tests/test_cli.py, which also settles a duplicate the lessons left behind. The Dockerfile and the CI workflow are written but not run here: they need Docker and GitHub. No cell calls a hosted model.

Open a new Colab notebook, call it module-02-lab.ipynb, and run each cell in order.

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