mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-05-22 22:33:28 -05:00
[GH-ISSUE #1691] [Bug] Labs don't load #13547
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 @bdub-1 on GitHub (May 6, 2026).
Original GitHub issue: https://github.com/harvard-edge/cs249r_book/issues/1691
Area
Other
Location
(All labs it seems) https://mlsysbook.ai/labs/vol1/lab_01_ml_intro/
Description
It seems both online and local versions do not work. I get an internal error when attempting to boot up. No information is loaded, just a blank white screen with the error popup in the corner.
Message: "An internal error has occured"
Expected Behavior
Lab should load completely in online and local versions.
Environment (TinyTorch bugs only)
@Shashank-Tripathi-07 commented on GitHub (May 7, 2026):
The environment output shows Python 3.14.4, which is the likely cause.
Python 3.14 is still in pre-release (alpha/beta) and mlsysim currently declares support for Python 3.10 through 3.13. Running on 3.14 can cause import failures or silent breakage in dependencies (pydantic, pint, numpy, plotly) before the lab even renders, which matches the blank screen with "An internal error has occurred" that Marimo shows on startup failure.
To confirm: try downgrading to Python 3.12 or 3.13 and recreating the venv:
If it loads on 3.12/3.13, the issue is Python 3.14 compatibility, not a bug in the labs themselves.
For the online version at
mlsysbook.ai/labs/, the labs run via WebAssembly (Pyodide) which is pinned to its own Python version and is unaffected by your local Python install. If the online version also shows a blank screen, please share the browser console output (F12 > Console tab) as that will give more detail on what is failing.One small note: the URL in the report (
/labs/vol1/lab_01_ml_intro/) has a trailing slash. The correct URL ishttps://mlsysbook.ai/labs/vol1/lab_01_ml_intro.html.@Shashank-Tripathi-07 commented on GitHub (May 7, 2026):
Investigated further by reproducing locally on Python 3.14.4 (same version as reported).
Root cause confirmed: missing mlsysim in the venv, not a Python 3.14 issue.
The environment output in the report shows a
tinytorchvenv path:The TinyTorch venv has
marimoinstalled (needed for TinyTorch modules) but does not havemlsysimorplotly, which every lab requires. When marimo loads the lab and hitsfrom mlsysim.labs.state import DesignLedger(setup cell), the import fails and marimo surfaces it as "An internal error has occurred" with a blank screen.Python 3.14 itself is not the problem. All lab dependencies (marimo, mlsysim, plotly, pint, pydantic, numpy) install and run cleanly on 3.14.
Fix: labs need their own venv, separate from the TinyTorch venv.
Or follow the Co-Labs local setup guide which lists the exact requirements. Do not run labs from inside the TinyTorch venv.
The online version at
mlsysbook.ai/labs/installs mlsysim via a bundled WASM wheel and is unaffected by local venv state. If the online version also shows a blank screen, please share the browser console output (F12 > Console tab).Closing as a setup issue rather than a bug. Feel free to reopen if the problem persists after installing mlsysim in a clean venv.
@bdub-1 commented on GitHub (May 7, 2026):
Console output for browser:
@Shashank-Tripathi-07 commented on GitHub (May 7, 2026):
Root cause identified.
micropip.install("../../wheels/mlsysim-0.1.1-py3-none-any.whl")resolves tomlsysbook.ai/labs/wheels/mlsysim-0.1.1-py3-none-any.whlin the browser. The live site was last deployed before the0.1.1wheel landed (commit1eb30f5f8), so that URL returns a 404 HTML page.micropippasses it tozipfile, which raisesBadZipFile. Every downstream cell then fails with "Ancestor raised".Immediate fix (no code change needed): retrigger
labs-publish-live.ymlviaworkflow_dispatch. The build compiles the0.1.1wheel fresh and deploys it.PR #1696 adds two guards to prevent this recurring:
build_site.shthat fails the build immediately if the built wheel version does not match what the labs reference viamicropip@bdub-1 commented on GitHub (May 8, 2026):
Also, @Shashank-Tripathi-07, as a friendly fyi, Python 3.14 has been in stable release since October 7th of 2025. Reference if you're interested :)
@Shashank-Tripathi-07 commented on GitHub (May 9, 2026):
yeah, that I missed cause I was version testing the labs with other versions of python, just a slip of tongue 😄