mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 17:49:07 -05:00
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1386
Author: @profvjreddi
Created: 4/17/2026
Status: ✅ Merged
Merged: 4/17/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/labs-widget-return-audit📝 Commits (1)
80b916ffix(labs): widget return-tuple sweep + static test for regressions (#1332)📊 Changes
34 files changed (+419 additions, -326 deletions)
View changed files
📝
labs/tests/test_static.py(+82 -0)📝
labs/vol1/lab_00_introduction.py(+5 -2)📝
labs/vol1/lab_01_ml_intro.py(+11 -15)📝
labs/vol1/lab_02_ml_systems.py(+13 -17)📝
labs/vol1/lab_03_ml_workflow.py(+6 -8)📝
labs/vol1/lab_04_data_engr.py(+8 -4)📝
labs/vol1/lab_05_nn_compute.py(+9 -4)📝
labs/vol1/lab_06_nn_arch.py(+8 -4)📝
labs/vol1/lab_07_ml_frameworks.py(+8 -4)📝
labs/vol1/lab_08_model_train.py(+9 -4)📝
labs/vol1/lab_09_data_selection.py(+9 -4)📝
labs/vol1/lab_10_model_compress.py(+8 -4)📝
labs/vol1/lab_11_hw_accel.py(+8 -4)📝
labs/vol1/lab_12_perf_bench.py(+8 -4)📝
labs/vol1/lab_13_model_serving.py(+9 -4)📝
labs/vol1/lab_14_ml_ops.py(+8 -4)📝
labs/vol1/lab_15_responsible_engr.py(+8 -4)📝
labs/vol1/lab_16_ml_conclusion.py(+10 -4)📝
labs/vol2/lab_01_introduction.py(+11 -5)📝
labs/vol2/lab_02_compute_infra.py(+10 -5)...and 14 more files
📄 Description
what
sweeps the whole labs tree to fix a marimo dataflow bug class that left widgets invisible to the tabs cell in 17 of 33 labs. reported by @asgalon in #1332 for lab_02 + lab_03 (fixed in #1385); this pr does the rest and locks the regression out via a new static test.
the bug
marimo routes widget state strictly through each cell's return tuple. every
@app.cellthat defined helper widgets (sliders, dropdowns) alongside the terminalpartX_predictionreturned only the prediction. the helpers were defined but never reached the tabs cell — they were effectively dead allocations. sliders never rendered after the prediction unlocked; chart inputs never re-ran on change. every static and engine test still passed because the cells executed fine in isolation.the audit script (
/tmp/audit_widget_returns.py) found:(the 42 "hits" that remain in the updated audit are all widgets defined inside the tabs cell itself, consumed by its own
build_part_*closures via scope — they don't need to flow outward. the new static test excludes those.)changes
return (...)tuple now lists everymo.ui.*it defines, alphabetical. every tabs-cell signature is rewritten to declare every widget it references. no logic, labels, or UI copy touched.TestWidgetReturnCompletenessinlabs/tests/test_static.py. fails on any new cell defining a widget without returning it (render sinks liketabs/_tabsand tabs-cell-local widgets excluded). 33 / 33 labs pass; a regression is blocked at CI time.test plan
labs/tests/test_static.py+tests/test_engine.py: 825 passed 4 skipped 1 xfailed (up from 792 — 33 new test runs)marimo checkspot-sampled on several labs: exit 0closes the main thread of #1332. @asgalon's "updated example values" suggestion for Lab 02 and the tabs-cell widget extraction cleanup left as follow-ups.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.