[PR #1320] [CLOSED] fix: export DecisionLog and FailureBanner from mlsysim.labs #7271

Closed
opened 2026-04-24 17:22:56 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

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

Base: mainHead: fix/labs-missing-exports


📝 Commits (10+)

  • a35f74b ci(staffml): add paper PDF build workflow + update Makefile
  • fc7e4d3 docs(site): add StaffML to About page — stats strip, timeline, CTA
  • 362ad2a fix(site): restore sidebar nav, fix cover images, update Vol II year to 2027
  • d302575 refactor(tinytorch): migrate from legacy np.random to default_rng(7)
  • 88d0385 docs(staffml): add 'How Questions Are Built' transparency section
  • 0f4c4f6 Update contributors list [skip ci]
  • 70cc0e1 doc(paper): comprehensive layout, math verification, and structural polishing
  • f8ed5cf feat(staffml): auto-generate paper macros from corpus stats
  • f03a201 docs(staffml): add LLM Failure Modes taxonomy to paper QA section
  • 0e2518f fix(staffml): wire chain_ids into corpus questions (enables chain UI)

📊 Changes

3007 files changed (+1127192 additions, -207278 deletions)

View changed files

📝 .all-contributorsrc (+249 -193)
📝 .codespell-ignore-words.txt (+30 -4)
.envrc (+0 -5)
.github/ISSUE_TEMPLATE/bug_report.yml (+44 -0)
.github/ISSUE_TEMPLATE/config.yml (+5 -0)
.github/ISSUE_TEMPLATE/interview_question.yml (+85 -0)
.github/ISSUE_TEMPLATE/mlsysim_bug.yml (+55 -0)
.github/ISSUE_TEMPLATE/new_challenge.yml (+40 -0)
.github/ISSUE_TEMPLATE/staffml_contribute.yml (+107 -0)
.github/ISSUE_TEMPLATE/staffml_report.yml (+72 -0)
.github/ISSUE_TEMPLATE/tinytorch_improvement.yml (+61 -0)
.github/PULL_REQUEST_TEMPLATE.md (+35 -0)
.github/TINYTORCH_ISSUE_TEMPLATE/module_architecture_improvement.md (+0 -147)
.github/dev-landing/book-index.html (+137 -0)
📝 .github/dev-landing/index.html (+40 -12)
📝 .github/docker/Dockerfile (+3 -3)
.github/scripts/generate_interview_flashcard.py (+116 -0)
.github/scripts/rewrite-dev-urls.sh (+76 -0)
.github/scripts/sync_newsletter.py (+324 -0)
📝 .github/workflows/all-contributors-add.yml (+155 -135)

...and 80 more files

📄 Description

Problem

DecisionLog and FailureBanner are defined in mlsysim/labs/components.py and imported directly by 14+ lab notebooks across both volumes, but were missing from the package's __init__.py.

This means any lab that does:

from mlsysim.labs.components import DecisionLog

works fine, but the intended public API:

from mlsysim.labs import DecisionLog

raises ImportError.

Fix

Add DecisionLog and FailureBanner to both the import block and __all__ in mlsysim/labs/__init__.py.

Testing

from mlsysim.labs import DecisionLog, FailureBanner  # now works

Verified against the source tree locally.


🔄 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/1320 **Author:** [@Shashank-Tripathi-07](https://github.com/Shashank-Tripathi-07) **Created:** 4/11/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/labs-missing-exports` --- ### 📝 Commits (10+) - [`a35f74b`](https://github.com/harvard-edge/cs249r_book/commit/a35f74b3ae7f9498312ac81b6826ab91974a9143) ci(staffml): add paper PDF build workflow + update Makefile - [`fc7e4d3`](https://github.com/harvard-edge/cs249r_book/commit/fc7e4d3abcd22f76061527fb5707a36bc3ccd81f) docs(site): add StaffML to About page — stats strip, timeline, CTA - [`362ad2a`](https://github.com/harvard-edge/cs249r_book/commit/362ad2a31c29a3926e9ba7c41ef64320fc18e1a9) fix(site): restore sidebar nav, fix cover images, update Vol II year to 2027 - [`d302575`](https://github.com/harvard-edge/cs249r_book/commit/d30257577c97d54447f5b760bad31ff885bae9c9) refactor(tinytorch): migrate from legacy np.random to default_rng(7) - [`88d0385`](https://github.com/harvard-edge/cs249r_book/commit/88d0385a3e12ca7695cc0f1e52054568ff1ad170) docs(staffml): add 'How Questions Are Built' transparency section - [`0f4c4f6`](https://github.com/harvard-edge/cs249r_book/commit/0f4c4f64bc1ba0effb5acf61e0cb6d1f557b4b71) Update contributors list [skip ci] - [`70cc0e1`](https://github.com/harvard-edge/cs249r_book/commit/70cc0e16a692fff604ab3d3e054111c0c52585d5) doc(paper): comprehensive layout, math verification, and structural polishing - [`f8ed5cf`](https://github.com/harvard-edge/cs249r_book/commit/f8ed5cf810ef1b88b9a6ded27c482b87e1b7e072) feat(staffml): auto-generate paper macros from corpus stats - [`f03a201`](https://github.com/harvard-edge/cs249r_book/commit/f03a20148c9fd44a804994c01ffcce53f5a5d7b8) docs(staffml): add LLM Failure Modes taxonomy to paper QA section - [`0e2518f`](https://github.com/harvard-edge/cs249r_book/commit/0e2518f189ba53ba084bdf15f8fc12b2718bfbfc) fix(staffml): wire chain_ids into corpus questions (enables chain UI) ### 📊 Changes **3007 files changed** (+1127192 additions, -207278 deletions) <details> <summary>View changed files</summary> 📝 `.all-contributorsrc` (+249 -193) 📝 `.codespell-ignore-words.txt` (+30 -4) ➖ `.envrc` (+0 -5) ➕ `.github/ISSUE_TEMPLATE/bug_report.yml` (+44 -0) ➕ `.github/ISSUE_TEMPLATE/config.yml` (+5 -0) ➕ `.github/ISSUE_TEMPLATE/interview_question.yml` (+85 -0) ➕ `.github/ISSUE_TEMPLATE/mlsysim_bug.yml` (+55 -0) ➕ `.github/ISSUE_TEMPLATE/new_challenge.yml` (+40 -0) ➕ `.github/ISSUE_TEMPLATE/staffml_contribute.yml` (+107 -0) ➕ `.github/ISSUE_TEMPLATE/staffml_report.yml` (+72 -0) ➕ `.github/ISSUE_TEMPLATE/tinytorch_improvement.yml` (+61 -0) ➕ `.github/PULL_REQUEST_TEMPLATE.md` (+35 -0) ➖ `.github/TINYTORCH_ISSUE_TEMPLATE/module_architecture_improvement.md` (+0 -147) ➕ `.github/dev-landing/book-index.html` (+137 -0) 📝 `.github/dev-landing/index.html` (+40 -12) 📝 `.github/docker/Dockerfile` (+3 -3) ➕ `.github/scripts/generate_interview_flashcard.py` (+116 -0) ➕ `.github/scripts/rewrite-dev-urls.sh` (+76 -0) ➕ `.github/scripts/sync_newsletter.py` (+324 -0) 📝 `.github/workflows/all-contributors-add.yml` (+155 -135) _...and 80 more files_ </details> ### 📄 Description ## Problem `DecisionLog` and `FailureBanner` are defined in `mlsysim/labs/components.py` and imported directly by 14+ lab notebooks across both volumes, but were missing from the package's `__init__.py`. This means any lab that does: ```python from mlsysim.labs.components import DecisionLog ``` works fine, but the intended public API: ```python from mlsysim.labs import DecisionLog ``` raises `ImportError`. ## Fix Add `DecisionLog` and `FailureBanner` to both the import block and `__all__` in `mlsysim/labs/__init__.py`. ## Testing ```python from mlsysim.labs import DecisionLog, FailureBanner # now works ``` Verified against the source tree locally. --- <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-24 17:22:56 -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#7271