[PR #1371] [MERGED] refactor(labs/lab_00): manual Pattern C migration (closes #1347) #5154

Closed
opened 2026-04-19 12:50:37 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1371
Author: @profvjreddi
Created: 4/17/2026
Status: Merged
Merged: 4/17/2026
Merged by: @profvjreddi

Base: devHead: refactor/lab00-pattern-c


📝 Commits (1)

  • 0b9dc7f refactor(labs/lab_00): manual Pattern C migration (closes #1347)

📊 Changes

2 files changed (+22 additions, -25 deletions)

View changed files

📝 labs/tests/test_static.py (+3 -21)
📝 labs/vol1/lab_00_introduction.py (+19 -4)

📄 Description

what

split the gated 5-widget check-2 cell in vol1/lab_00_introduction.py into:

  • ungated widget-defs cell (always defines model_size, quantization, move_server, faster_gpu, edge_deploy)
  • gated display cell (renders them conditionally on check1 being answered)

this matches the canonical pattern from lab_01 post-#1339 and keeps downstream helpers (check2empty, check2value_list at line 1372) from hitting undefined widgets when check1 has not been answered.

also removed the _KNOWN_MULTI_LEAK_LABS grandfather set in labs/tests/test_static.py now that it is empty. the one-widget-per-gated-cell rule applies strictly to all 33 labs going forward.

why manual

lab_00 uses check1/check2/check3 sequential concept checks, structurally different from the partX_prediction idiom elsewhere. the mechanical Pattern C transform from #1352 would have broken test_engine because check2 helpers rely on all 5 checkboxes being globally defined.

test plan

  • labs/tests/test_static.py passes (no more skip for lab_00, 792 passed 4 skipped 1 xfailed)
  • labs/tests/test_engine.py passes (app.run headlessly)
  • python3 -m marimo check vol1/lab_00_introduction.py clean (exit 0)
  • CI green on dev

closes #1347


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1371 **Author:** [@profvjreddi](https://github.com/profvjreddi) **Created:** 4/17/2026 **Status:** ✅ Merged **Merged:** 4/17/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `refactor/lab00-pattern-c` --- ### 📝 Commits (1) - [`0b9dc7f`](https://github.com/harvard-edge/cs249r_book/commit/0b9dc7fe50a5112368d5a06249314df0af33b9e7) refactor(labs/lab_00): manual Pattern C migration (closes #1347) ### 📊 Changes **2 files changed** (+22 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `labs/tests/test_static.py` (+3 -21) 📝 `labs/vol1/lab_00_introduction.py` (+19 -4) </details> ### 📄 Description ## what split the gated 5-widget check-2 cell in vol1/lab_00_introduction.py into: - ungated widget-defs cell (always defines model_size, quantization, move_server, faster_gpu, edge_deploy) - gated display cell (renders them conditionally on check1 being answered) this matches the canonical pattern from lab_01 post-#1339 and keeps downstream helpers (check2empty, check2value_list at line 1372) from hitting undefined widgets when check1 has not been answered. also removed the `_KNOWN_MULTI_LEAK_LABS` grandfather set in labs/tests/test_static.py now that it is empty. the one-widget-per-gated-cell rule applies strictly to all 33 labs going forward. ## why manual lab_00 uses check1/check2/check3 sequential concept checks, structurally different from the partX_prediction idiom elsewhere. the mechanical Pattern C transform from #1352 would have broken test_engine because check2 helpers rely on all 5 checkboxes being globally defined. ## test plan - [x] labs/tests/test_static.py passes (no more skip for lab_00, 792 passed 4 skipped 1 xfailed) - [x] labs/tests/test_engine.py passes (app.run headlessly) - [x] python3 -m marimo check vol1/lab_00_introduction.py clean (exit 0) - [ ] CI green on dev closes #1347 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-19 12:50:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#5154