[PR #1323] [MERGED] fix(tinytorch): correct export path mismatch for modules 09 and 13 #8119

Closed
opened 2026-04-27 17:25:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1323
Author: @Shashank-Tripathi-07
Created: 4/11/2026
Status: Merged
Merged: 4/12/2026
Merged by: @profvjreddi

Base: devHead: fix/tinytorch-export-path-mismatch


📝 Commits (1)

  • b267aab fix(tinytorch): correct export path mismatch for modules 09 and 13

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 tinytorch/tito/commands/export_utils.py (+2 -2)

📄 Description

Summary

SOURCE_MAPPINGS in export_utils.py uses wrong keys for modules 09 and 13 — mismatching their default_exp directives. After tito module complete 09/13, exported files land at the wrong package path, causing ModuleNotFoundError on every import with zero workaround.

Area

  • TinyTorch (modules, tests, milestones)
  • Book (textbook content, figures, exercises)
  • StaffML (interview questions, challenges)
  • Kits (hardware labs)
  • Infrastructure (CI/CD, scripts, config)

Changes

  • ("core", "convolutions")("core", "spatial") — aligns with #| default_exp core.spatial in 09_convolutions.py
  • ("core", "transformer")("core", "transformers") — aligns with #| default_exp core.transformers in 13_transformers.py

Both source files have always declared the correct names via default_exp. The mapping was just never synced.

Testing

  • Manual verification — simulated tito module complete by copying exported files to both wrong path (old) and correct path (new), confirmed ModuleNotFoundError with old keys, clean import with new keys:
# Before fix:
python -c "from tinytorch.core.spatial import Conv2d"
# ModuleNotFoundError: No module named 'tinytorch.core.spatial'

# After fix:
python -c "from tinytorch.core.spatial import Conv2d"
# OK

None — discovered during local testing of the module workflow.


🔄 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/1323 **Author:** [@Shashank-Tripathi-07](https://github.com/Shashank-Tripathi-07) **Created:** 4/11/2026 **Status:** ✅ Merged **Merged:** 4/12/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `fix/tinytorch-export-path-mismatch` --- ### 📝 Commits (1) - [`b267aab`](https://github.com/harvard-edge/cs249r_book/commit/b267aab69110659793f8e39ee7d06650e0591e53) fix(tinytorch): correct export path mismatch for modules 09 and 13 ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `tinytorch/tito/commands/export_utils.py` (+2 -2) </details> ### 📄 Description ## Summary `SOURCE_MAPPINGS` in `export_utils.py` uses wrong keys for modules 09 and 13 — mismatching their `default_exp` directives. After `tito module complete 09/13`, exported files land at the wrong package path, causing `ModuleNotFoundError` on every import with zero workaround. ## Area - [x] TinyTorch (modules, tests, milestones) - [ ] Book (textbook content, figures, exercises) - [ ] StaffML (interview questions, challenges) - [ ] Kits (hardware labs) - [ ] Infrastructure (CI/CD, scripts, config) ## Changes - `("core", "convolutions")` → `("core", "spatial")` — aligns with `#| default_exp core.spatial` in `09_convolutions.py` - `("core", "transformer")` → `("core", "transformers")` — aligns with `#| default_exp core.transformers` in `13_transformers.py` Both source files have always declared the correct names via `default_exp`. The mapping was just never synced. ## Testing - [x] Manual verification — simulated `tito module complete` by copying exported files to both wrong path (old) and correct path (new), confirmed `ModuleNotFoundError` with old keys, clean import with new keys: ```bash # Before fix: python -c "from tinytorch.core.spatial import Conv2d" # ModuleNotFoundError: No module named 'tinytorch.core.spatial' # After fix: python -c "from tinytorch.core.spatial import Conv2d" # OK ``` ## Related Issues None — discovered during local testing of the module workflow. --- <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-27 17:25:17 -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#8119