Authoring conventions

These conventions keep lessons, checks and solutions consistent. Follow them when adding or revising material (by hand or with an assistant).

Unit layout

A unit is one study session. Each core session is one notebook, and its exercise material lives in labs/<id>/. Solutions mirror the same relative path under solutions/, so a learner never opens a solution by accident. Review days live on their week page (docs/weeks/week-N.md, “Day 7”).

notebook_src/NN_slug.py   THE LESSON (source of truth): percent-format Python, all eight template
                          sections, Colab badge, setup cell, runnable worked examples, check cells,
                          hints in <details>, assessment questions. Build with `make notebooks`.
notebooks/NN_slug.ipynb   generated from notebook_src/ - never edit by hand
docs/notebooks/NN_slug.md generated site page (`make pages`) - never edit by hand
labs/<id>/
  README.md            short pointer to the notebook and a map of this folder
  example/             worked-example scripts the notebook runs, from the repository root
  lab/                 guided-lab starter code; the learner works HERE
  challenge/           independent challenge: README.md (task + acceptance criteria) and any starter
  hints/               hint1_concept.md, hint2_approach.md, hint3_partial.md (also inlined in the notebook)
  checks/              pytest checks for the lab         (grades lab/)
  checks_challenge/    pytest checks for the challenge   (grades challenge/)
  figures/             make_figures.py and the SVGs it writes
solutions/labs/<id>/
  lab/                 reference solution for the lab
  challenge/           reference solution for the challenge
  mutants/             plausible WRONG lab submissions (overlay dirs), each with a MUTANT.md
  mutants_challenge/   same, for the challenge
  assessment_answers.md   model answers, common incorrect answers and why they fail
solutions/exercises.md, checkpoints.md   collected references and answers, in notebook order

Notebook rules: every command cell runs from the repository root (the setup cell moves there); only python/pytest commands whose paths exist become code cells (servers, installs, --live, progress marks stay as text); diagrams are Mermaid sources in docs/assets/diagrams/src/, rendered to SVG with make diagrams and embedded through their raw GitHub URL so they also show in Colab; inline maths is $x$ in notebooks and $$x$$ on site pages (the page generator converts).

Checks

  • Checks are plain pytest. conftest.py obtains the directory to grade from tools.wbcheck.resolve_target("<unit path>", "<part>"), which honours WB_TARGET_DIR.
  • Checks assert behaviour and contracts (outputs, invariants, error handling, file structure a tool depends on). They must not require one particular implementation: no asserting private helper names, line counts, or exact log wording.
  • Every check suite is validated with python tools/verify_checks.py <unit>: the reference solution must pass and every mutant must fail. A mutant is a mistake a competent learner would plausibly make, not random breakage.
  • Passing checks means “guided practice completed”. It never means mastery; the independent-skill flag is set only after an unassisted challenge or review.

Status labels

Each unit and handbook section carries exactly one content status:

  • Planned - objective/deliverable defined; material not written.
  • Draft - written, not yet re-read against sources or executed end to end.
  • Reviewed - prose re-read for correctness; technical claims checked against the cited sources.
  • Execution verified - additionally: example code executed, reference solution executed, verify_checks passed (solution passes, mutants rejected), on the versions in docs/maintainers/tested-versions.md.

Never record a run, score, or citation that did not happen or was not consulted. Sources that were cited from memory and not opened must be marked “not re-verified this session”.

Style

  • Visuals: Mermaid diagrams for structure and flow; data figures generated by a committed figures/make_figures.py using tools/figstyle.py. Details in docs/maintainers/fork-brief.md, “Visuals”.

  • Runnable commands are given from the repository root unless stated.
  • Data: synthetic data is labelled SYNTHETIC wherever it is used, together with what cannot be concluded from it.
  • Stable anchors: handbook sections use explicit ids like H2.1; lessons are referred to by unit id (w1d3). Link by relative path.
  • No secrets, credentials, or cloud account identifiers in the repository.

Back to top

Applied ML Engineering course materials. Code is MIT licensed; prose is CC BY 4.0. The SKAB dataset is GPL-3.0 and is downloaded from its source, not redistributed here.