[PR #1192] [MERGED] feat: add type hints to modules 03, 04, and 05 (#1167) #2386

Closed
opened 2026-04-11 08:26:24 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1192
Author: @imuday984
Created: 2/21/2026
Status: Merged
Merged: 3/20/2026
Merged by: @profvjreddi

Base: devHead: feature/type-hints-03-04


📝 Commits (2)

  • 4888cae feat: add type hints to 03_layers and 04_losses (#1167)
  • 9b01eb1 feat: add type hints to 05_dataloader

📊 Changes

3 files changed (+82 additions, -49 deletions)

View changed files

📝 tinytorch/src/03_layers/03_layers.py (+52 -29)
📝 tinytorch/src/04_losses/04_losses.py (+18 -8)
📝 tinytorch/src/05_dataloader/05_dataloader.py (+12 -12)

📄 Description

Resolves #1167 for modules 03 and 04.

Following the discussion with @harishb00 in my previous PR, I have left 01_tensor and 02_activations for them to push. I have applied the suggested future imports and TypeAlias patterns to these new modules for cleaner code.

Note: I added these directly to the source files (src/) but haven't run the tito module complete build step locally to update the generated package files. Let me know if a maintainer can trigger the build.
thank you.


🔄 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/1192 **Author:** [@imuday984](https://github.com/imuday984) **Created:** 2/21/2026 **Status:** ✅ Merged **Merged:** 3/20/2026 **Merged by:** [@profvjreddi](https://github.com/profvjreddi) **Base:** `dev` ← **Head:** `feature/type-hints-03-04` --- ### 📝 Commits (2) - [`4888cae`](https://github.com/harvard-edge/cs249r_book/commit/4888caef76fb4999a404c6f9c2eb8100d200efd1) feat: add type hints to 03_layers and 04_losses (#1167) - [`9b01eb1`](https://github.com/harvard-edge/cs249r_book/commit/9b01eb1a1e686415ed0fc7736ea4f16dc3545457) feat: add type hints to 05_dataloader ### 📊 Changes **3 files changed** (+82 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `tinytorch/src/03_layers/03_layers.py` (+52 -29) 📝 `tinytorch/src/04_losses/04_losses.py` (+18 -8) 📝 `tinytorch/src/05_dataloader/05_dataloader.py` (+12 -12) </details> ### 📄 Description Resolves #1167 for modules 03 and 04. Following the discussion with @harishb00 in my previous PR, I have left 01_tensor and 02_activations for them to push. I have applied the suggested __future__ imports and TypeAlias patterns to these new modules for cleaner code. Note: I added these directly to the source files (src/) but haven't run the tito module complete build step locally to update the generated package files. Let me know if a maintainer can trigger the build. thank you. --- <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-11 08:26:24 -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#2386