3 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
df7df9560d Implement MLSysBook labs release draft 2026-06-02 15:15:27 -04:00
Vijay Janapa Reddi
9c91cc5e4a fix(labs): inline WASM bootstrap so Pyodide can find it
marimo's html-wasm export bundles only the notebook .py file.
The shared labs/bootstrap.py is not available in the Pyodide
virtual filesystem, so `from bootstrap import setup_lab` fails
with ModuleNotFoundError on every lab in the browser smoke test.

WASM bootstrapping is inherently inline work: you cannot import
a module to install the modules it needs. Each lab's Cell 0 now
handles the two paths directly:

  - emscripten: micropip.install the runtime packages + wheel
  - native: bootstrap.native_bootstrap() for sys.path setup

bootstrap.py is simplified to native-only (the WASM path in
setup_lab was unreachable and its wheel_relpath() would also
have failed reading pyproject.toml from the virtual filesystem).

The existing test_static.py wheel-version consistency test still
catches drift: it reads the version from pyproject.toml and
asserts the inline micropip URL matches across all 33 labs.
2026-05-27 06:17:36 -04:00
Vijay Janapa Reddi
6abc1bedce Modernize labs against current MLSysIM API and shared WASM bootstrap.
Centralize micropip/setup in labs/bootstrap.py, wire Engine.solve and physics helpers where labs teach them, add missing grid regions for sustainability, and normalize vol1 imports to registry entry points.
2026-05-25 14:28:09 -04:00