mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-06 09:38:33 -05:00
[GH-ISSUE #1388] [Bug] vol2/lab_05_dist_train: silent Pyodide hang in WASM export — no widgets render #4399
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?
Originally created by @profvjreddi on GitHub (Apr 17, 2026).
Original GitHub issue: https://github.com/harvard-edge/cs249r_book/issues/1388
summary
found during a local end-to-end audit of all 33 labs:
labs/vol2/lab_05_dist_train.pyexports fine, boots Pyodide without any console error, and its marimo shell attaches — but the interactive tabs / sliders / radios NEVER render. the lab is effectively non-functional in WASM mode.repro
cd mlsysim && python3 -m build --wheel/tmp/wasm/wheels/.marimo export html-wasm labs/vol2/lab_05_dist_train.py -o /tmp/wasm/lab_05/index.html --mode run --no-show-code/tmp/wasmwith COEP/COOP headers (seelabs/tests/browser_smoke.py)./lab_05/index.htmlin headless Chromium via Playwright.[role=\"tab\"]count stays at 0.diagnostics
marimo check vol2/lab_05_dist_train.py→ exit 0test_static.py+test_engine.py(both viaapp.run()) → passbrowser_smoke.py→ passes with 'Pyodide settled in 5.0s (captured errors: 0)'tabs=0 radios=0 sliders=0pageerror, noconsole.error, no{\"type\":\"exception\"}payloadnot caused by recent PRs
the WASM bootstrap in this file is identical to the state after #1353 (
6d56fff7a, 'import plotly.subplots AFTER micropip install'). PR #1386 only reordered its return tuples alphabetically; it did not change the bootstrap or any cell logic.what to investigate
printmarkers or use marimo's--mode editexport to get cell-level logs.mlsysim.core.defaultsimports blocks in the WASM runtime for this lab specifically.why existing guards missed this
awaithang throws no error and the shell element attaches anyway.recommended follow-up guard
extend
labs/tests/browser_smoke.pyto assert a minimum[role=\"tab\"]count on labs that declaremo.ui.tabs(...). any lab where the tabs element fails to render after a 60s wait should fail CI.found this while running a full 33-lab audit. the other 32 labs render correctly.