[PR #1322] [CLOSED] fix: add missing mlsysim wheel and correct micropip path in all labs #9023

Closed
opened 2026-05-03 01:13:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1322
Author: @Shashank-Tripathi-07
Created: 4/11/2026
Status: Closed

Base: devHead: fix/add-mlsysim-wasm-wheel


📄 Description

Problem

Every lab notebook (33 total across vol1 and vol2) fails to load in the browser with a micropip install error. Two compounding issues:

  1. wheels/ directory missing — all labs reference wheels/mlsysim-0.1.0-py3-none-any.whl via micropip in their WASM bootstrap block, but the directory and wheel file were never committed to the repo (it's gitignored by default).

  2. Wrong relative path — the path used in all labs was ../../../wheels/ which resolves outside the repo root. The correct path from labs/vol{1,2}/ to the repo root is ../../wheels/, which is also what labs/tests/test_static.py already asserts.

Impact

Zero workaround — the WASM bootstrap block runs unconditionally when sys.platform == "emscripten". Every student opening any lab in the browser hits this error before the first cell executes. No lab is usable in browser/WASM mode.

Fix

  1. Built the mlsysim-0.1.0-py3-none-any.whl wheel and committed it to wheels/
  2. Corrected the relative path from ../../../wheels/../../wheels/ across all 33 lab files

Verification

Aligns with the existing test assertion in labs/tests/test_static.py:

expected_fragment = f"../../wheels/mlsysim-{version}-py3-none-any.whl"
assert expected_fragment in source

🔄 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/1322 **Author:** [@Shashank-Tripathi-07](https://github.com/Shashank-Tripathi-07) **Created:** 4/11/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/add-mlsysim-wasm-wheel` --- ### 📄 Description ## Problem Every lab notebook (33 total across vol1 and vol2) fails to load in the browser with a `micropip` install error. Two compounding issues: 1. **`wheels/` directory missing** — all labs reference `wheels/mlsysim-0.1.0-py3-none-any.whl` via micropip in their WASM bootstrap block, but the directory and wheel file were never committed to the repo (it's gitignored by default). 2. **Wrong relative path** — the path used in all labs was `../../../wheels/` which resolves outside the repo root. The correct path from `labs/vol{1,2}/` to the repo root is `../../wheels/`, which is also what `labs/tests/test_static.py` already asserts. ## Impact Zero workaround — the WASM bootstrap block runs unconditionally when `sys.platform == "emscripten"`. Every student opening any lab in the browser hits this error before the first cell executes. No lab is usable in browser/WASM mode. ## Fix 1. Built the `mlsysim-0.1.0-py3-none-any.whl` wheel and committed it to `wheels/` 2. Corrected the relative path from `../../../wheels/` → `../../wheels/` across all 33 lab files ## Verification Aligns with the existing test assertion in `labs/tests/test_static.py`: ```python expected_fragment = f"../../wheels/mlsysim-{version}-py3-none-any.whl" assert expected_fragment in source ``` --- <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-05-03 01:13:44 -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#9023