Use this guide for every notebook in the PyTorch course.
Notebook Order
Every notebook should follow this order:
- Purpose and question.
- Imports.
- Random seed and runtime check.
- Data creation or loading.
- Shape and data sanity checks.
- Baseline or simple comparison where useful.
- Model definition.
- Training loop.
- Validation and diagnostics.
- Error examples.
- Limitation note.
- Save only approved small artifacts.
Classroom Rule
Do not hide important work in one large helper function before the learner has seen it. A learner should be able to point to the cell that creates data, the cell that defines the model, the cell that calculates loss, and the cell that updates weights.
Reproducibility
Use a visible random seed for examples. Still explain that exact results can vary by package version, hardware, and numerical settings.
Output Discipline
Every model notebook should show:
- at least one shape check;
- the first and last training loss or metric;
- a validation result where applicable;
- at least one error or failure case; and
- a short written limitation.
Safety
Do not ask learners to paste private data, access tokens, client records, health data, financial data, legal data, authentication data, or scraped records into notebooks.
