Fixes#1388 — lab_05_dist_train.py exports cleanly and Pyodide boots without error, but interactive tabs never render in the browser.
Root cause: Cell 0 imported INFINIBAND_NDR_BW_GBS from mlsysim.core.defaults but the return tuple referenced IB_NDR_BW_GBS — a name that was never assigned. This NameError causes Pyodide to stall silently mid-execution with no console error, leaving all mo.ui.tabs unrendered (~66 kernel messages instead of ~84).
Dead imports removed: GPU_MTTF_HOURS, IB_NDR_LATENCY_US, SCALING_EFF_256GPU, OVERHEAD_PIPELINE_BUBBLE, and unused EDGE variable were all imported/assigned but never consumed by any downstream cell.
Magic numbers replaced: Hardware tier dropdowns and synthesis cell hardcoded 989.0, 312.0, 25.0, 12.5, 65.0 — these now use H100_TFLOPS_FP16, A100_TFLOPS_FP16, T4_TFLOPS_FP16, IB_NDR_BW_GBS, IB_HDR_BW_GBS, ETH_100G_BW_GBS sourced from the mlsysim registry.
Regression guard: browser_smoke.py extended with Phase 4 — after network-idle, checks that [role="tab"] elements are visible for any lab that declares mo.ui.tabs. This catches the exact failure mode in #1388 that previously passed all smoke checks silently.
Test plan
Export lab_05_dist_train.py with marimo export html-wasm and verify tabs render in headless Chromium
Run browser_smoke.py against the exported lab — Phase 4 should pass cleanly
Introduce the original bug (remove IB_NDR_BW_GBS alias) and confirm Phase 4 emits [tabs-missing]
Verify other vol2 labs unaffected (no new params injected into their cells)
🔄 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/1389
**Author:** [@Shashank-Tripathi-07](https://github.com/Shashank-Tripathi-07)
**Created:** 4/17/2026
**Status:** ✅ Merged
**Merged:** 4/19/2026
**Merged by:** [@profvjreddi](https://github.com/profvjreddi)
**Base:** `dev` ← **Head:** `fix/lab05-wasm-silent-hang-1388`
---
### 📝 Commits (1)
- [`15390af`](https://github.com/harvard-edge/cs249r_book/commit/15390afb5ff3724459e9cc1593078f854f9a0076) fix(lab05): resolve silent WASM hang on Pyodide boot (#1388)
### 📊 Changes
**2 files changed** (+49 additions, -15 deletions)
<details>
<summary>View changed files</summary>
📝 `labs/tests/browser_smoke.py` (+29 -2)
📝 `labs/vol2/lab_05_dist_train.py` (+20 -13)
</details>
### 📄 Description
## Summary
Fixes #1388 — `lab_05_dist_train.py` exports cleanly and Pyodide boots without error, but interactive tabs never render in the browser.
- **Root cause**: Cell 0 imported `INFINIBAND_NDR_BW_GBS` from `mlsysim.core.defaults` but the return tuple referenced `IB_NDR_BW_GBS` — a name that was never assigned. This `NameError` causes Pyodide to stall silently mid-execution with no console error, leaving all `mo.ui.tabs` unrendered (~66 kernel messages instead of ~84).
- **Dead imports removed**: `GPU_MTTF_HOURS`, `IB_NDR_LATENCY_US`, `SCALING_EFF_256GPU`, `OVERHEAD_PIPELINE_BUBBLE`, and unused `EDGE` variable were all imported/assigned but never consumed by any downstream cell.
- **Magic numbers replaced**: Hardware tier dropdowns and synthesis cell hardcoded `989.0`, `312.0`, `25.0`, `12.5`, `65.0` — these now use `H100_TFLOPS_FP16`, `A100_TFLOPS_FP16`, `T4_TFLOPS_FP16`, `IB_NDR_BW_GBS`, `IB_HDR_BW_GBS`, `ETH_100G_BW_GBS` sourced from the mlsysim registry.
- **Regression guard**: `browser_smoke.py` extended with Phase 4 — after network-idle, checks that `[role="tab"]` elements are visible for any lab that declares `mo.ui.tabs`. This catches the exact failure mode in #1388 that previously passed all smoke checks silently.
## Test plan
- [x] Export `lab_05_dist_train.py` with `marimo export html-wasm` and verify tabs render in headless Chromium
- [x] Run `browser_smoke.py` against the exported lab — Phase 4 should pass cleanly
- [x] Introduce the original bug (remove `IB_NDR_BW_GBS` alias) and confirm Phase 4 emits `[tabs-missing]`
- [x] Verify other vol2 labs unaffected (no new params injected into their cells)
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/harvard-edge/cs249r_book/pull/1389
Author: @Shashank-Tripathi-07
Created: 4/17/2026
Status: ✅ Merged
Merged: 4/19/2026
Merged by: @profvjreddi
Base:
dev← Head:fix/lab05-wasm-silent-hang-1388📝 Commits (1)
15390affix(lab05): resolve silent WASM hang on Pyodide boot (#1388)📊 Changes
2 files changed (+49 additions, -15 deletions)
View changed files
📝
labs/tests/browser_smoke.py(+29 -2)📝
labs/vol2/lab_05_dist_train.py(+20 -13)📄 Description
Summary
Fixes #1388 —
lab_05_dist_train.pyexports cleanly and Pyodide boots without error, but interactive tabs never render in the browser.INFINIBAND_NDR_BW_GBSfrommlsysim.core.defaultsbut the return tuple referencedIB_NDR_BW_GBS— a name that was never assigned. ThisNameErrorcauses Pyodide to stall silently mid-execution with no console error, leaving allmo.ui.tabsunrendered (~66 kernel messages instead of ~84).GPU_MTTF_HOURS,IB_NDR_LATENCY_US,SCALING_EFF_256GPU,OVERHEAD_PIPELINE_BUBBLE, and unusedEDGEvariable were all imported/assigned but never consumed by any downstream cell.989.0,312.0,25.0,12.5,65.0— these now useH100_TFLOPS_FP16,A100_TFLOPS_FP16,T4_TFLOPS_FP16,IB_NDR_BW_GBS,IB_HDR_BW_GBS,ETH_100G_BW_GBSsourced from the mlsysim registry.browser_smoke.pyextended with Phase 4 — after network-idle, checks that[role="tab"]elements are visible for any lab that declaresmo.ui.tabs. This catches the exact failure mode in #1388 that previously passed all smoke checks silently.Test plan
lab_05_dist_train.pywithmarimo export html-wasmand verify tabs render in headless Chromiumbrowser_smoke.pyagainst the exported lab — Phase 4 should pass cleanlyIB_NDR_BW_GBSalias) and confirm Phase 4 emits[tabs-missing]🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.