BotManifold
Tutorial

Course labs

How the course labs work: a copy of a reference module with key functions left for you to write, graded by the same tests that check the reference code.

How a lab works

Each lab is a copy of one of the tutorial's tested modules with the important functions emptied out. Their signature and docstring are still there; the body raises NotImplementedError with the name of the page that teaches it. You write the body. The module's own test suite, the one that checks the reference code in CI, then grades your version.

  1. Read the module page.
  2. Open the lab file, libs/tutorial/labs/<module>.py, and find each NotImplementedError.
  3. Write the function. The docstring says what it must return and in what shape.
  4. Grade it:
uv run --group tutorial python scripts/tutorial_labs.py check state_estimation

A lab is done when every test passes. Failing tests name the property that broke, such as "the filter beats raw positions" or "uncertainty grows through a gap", which is usually enough to find the mistake. To start again, reset writes a fresh copy (your work in that file is lost):

uv run --group tutorial python scripts/tutorial_labs.py reset state_estimation

list prints every lab with its functions and page. The reference implementation is the module of the same name in libs/tutorial/; look at it after you have tried, not before.

Everything runs on a laptop CPU. Most labs grade in under ten seconds; flow_matching trains small models and takes about half a minute.

The labs, in course order

LabYou writeTaught in
attentionscaled_dot_product_attentionToolkit: attention and transformers
flow_matchingflow_matching_loss, euler_sampleToolkit: generating trajectories with flow matching
grpogroup_advantagesToolkit: rewards and policy gradients
modular_e2emodular_stack, planner_inputsFrom modular stacks to end-to-end driving
sensor_encoderslift_splat, pillar_encodeSensor encoders for driving
geometryproject_points, to_current_frameCamera geometry and object queries
state_estimationkalman_filter, mean_nisState estimation and tracking
label_qualitycohen_kappa, audit_sample_sizeDriving data and labels
imitationcollectImitation learning and action chunking
planningbicycle_step, idm_accelerationPlanning and vehicle models
alpamayo_piecesunicycle_rollout, delta_tokenize, delta_detokenizeReading the Alpamayo-R1 code
policy_gradientgae, ppo_objectiveReinforcement learning
driving_metricsade_fde, min_ade_fde, pdm_scoreEvaluating driving models
conformalconformal_quantileUncertainty and runtime safety
safety_engineeringrss_min_gap, rss_filter, failure_free_milesSafety engineering for learned drivers
mini_driverteacher, to_token, episode_reward, guardedProject: build a mini driving VLA
capstonecautious_expert, train_driver, guarded_action, evidenceCapstone: ship a car-following driver

Some labs depend on another module's reference code (the capstone uses the closed-loop scenarios and the safety module's RSS gap). They import the reference version, so you can do the labs in any order.

On this page