[PR #1389] [MERGED] fix(lab05): resolve silent WASM hang on Pyodide boot (#1388) #8158

Closed
opened 2026-04-27 17:28:00 -05:00 by GiteaMirror · 0 comments
Owner

📋 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: devHead: fix/lab05-wasm-silent-hang-1388


📝 Commits (1)

  • 15390af fix(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 #1388lab_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>
GiteaMirror added the pull-request label 2026-04-27 17:28:00 -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#8158