Files
Vijay Janapa Reddi 972f5ea84b Merge local dev into feat/slides-refresh
dev's Classic Expository Style pass over the websites is the base;
re-applied from this branch only where a fact was missing or wrong: real
volume titles and status, no stale counts or timing claims, the four-volume
teaching guide and slide pages. Lecture lists regenerated by
tools/lectures.py; the PPTX note appears on all four volume pages.
2026-10-20 00:07:32 +02:00

66 lines
4.7 KiB
Plaintext

---
title: "For Instructors"
---
:::{.callout-warning title="Pilot Testing and Classroom Evaluation"}
TinyTorch's instructor workflows, grading harness, and nbgrader integrations are currently undergoing active pilot testing and pedagogical evaluation. Turn-key classroom packages, LMS grading templates, and autograding infrastructure will be ready for official course adoption in 2027.
:::
TinyTorch runs as a course: twenty modules, seven milestones, autograded notebooks through nbgrader, and a companion book. The full reference, including grading policy and the hardware extensions, is [`INSTRUCTOR.md`](https://github.com/harvard-edge/cs249r_book/blob/main/tinytorch/INSTRUCTOR.md) in the repository.
## What students write
Each module's source marks its solution regions. The student release clears the core regions across the twenty modules, and every module page lists its own under **What you write**. The remaining scaffold regions are secondary helpers, shape checks, and repeated patterns; they ship already solved, so a student implements each concept once rather than retyping it. Solutions stay in `src/`; only the notebooks generated for students have them removed.
`tito nbgrader generate` stages a module at one of three tiers:
| Tier | Flag | What students implement |
| :--- | :--- | :--- |
| Student (default) | `--tier student` | The core regions |
| Challenge | `--tier challenge` | Regions marked `role="challenge"`; none are marked yet, so this tier currently refuses to generate |
| Instructor | `--tier instructor` | Nothing: the complete reference, for answer keys and TAs |
: Assignment staging tiers. {#tbl-instructor-tiers tbl-colwidths="[22,22,56]"}
## The companion book prints the solutions
*TinyTorch: From Tensors to Transformers* explains each module by walking through its working code, so it prints the reference implementation of every function students write. Module pages link to it under **Finished? Read why**, after the work. If your course grades the modules, decide when students get the book: after each module's deadline, or at the end of the course.
## Set up grading
```bash
git clone https://github.com/harvard-edge/cs249r_book.git
cd cs249r_book/tinytorch
python -m venv .venv
source .venv/bin/activate
python -m pip install -r requirements.txt
python -m pip install -e ".[grading]" # adds nbgrader and its notebook tooling
tito nbgrader init # creates assignments/ and nbgrader_config.py
tito system health
```
## Run an assignment
```bash
tito nbgrader generate 01_tensor --tier student # stage the source assignment
tito nbgrader release 01_tensor # write the student version to assignments/release/
tito nbgrader collect 01_tensor # gather submissions from nbgrader's exchange
tito nbgrader autograde 01_tensor # run each submission's test cells and score them
tito nbgrader feedback 01_tensor # write feedback files
tito nbgrader report --assignment 01_tensor # export grades
```
`collect` reads nbgrader's exchange directory, which `release` does not fill, and the exchange is not supported on Windows. If you distribute assignments some other way (GitHub Classroom, an LMS, a zip file), skip `collect` and place each submission at `assignments/submitted/<student_id>/01_tensor/` yourself, then run `autograde`. `nbgrader formgrader` opens nbgrader's web interface for manual review of written answers.
## What else is available
- **Slides.** Each module page embeds an AI-generated slide deck, and the PDFs are downloadable from the viewer.
- **Audio.** Each module page has a short AI-generated audio overview.
- **Milestones.** Seven landmark milestones students run on their own framework, from 1958 Perceptron to 2024 Custom Kernels; see [Historical Milestones](milestones/index.qmd).
- **Extensions.** `tinytorch.extensions` includes hardware acceleration kernels (C++ SIMD, Triton, Apple MPS) and systems modules (Activation Checkpointing, LoRA, Graph Compiler, Loss Scaler) for advanced capstones and student exploration. See [Extending TinyTorch](extensions.qmd).
- **Community.** Students who log in with `tito community login` can sync progress to the TinyTorch website. A sync uploads the student's account email (as user ID), which modules and milestones they completed and when, their completion percentage, and their streak. It never uploads code or notebooks. Login asks before enabling automatic sync; `TITO_NO_SYNC=1` or `tito community sync --disable-auto` turns it off. If your institution restricts sharing student data, tell students not to log in.
## Changing TinyTorch
Contributors changing modules, tests, or `tito` itself should run the development test suite (`tito dev test --all`) before opening a pull request.