[GH-ISSUE #1127] With tinytorch 0.1.3, module 05 tests don't pass #1700

Closed
opened 2026-04-11 08:03:04 -05:00 by GiteaMirror · 10 comments
Owner

Originally created by @avikde on GitHub (Jan 21, 2026).
Original GitHub issue: https://github.com/harvard-edge/cs249r_book/issues/1127

Originally assigned to: @profvjreddi on GitHub.

First, thanks very much for this wonderful resource, as well as the mlsysbook!

I also understand that TinyTorch is in a pre-release state, and just hope that this feedback is helpful.


Issue 1: The tests for module 05 did not pass for me after sequentially going from 1 -> 5

Potential root cause: It appears that maybe the module order used to be different in the past, but in the current state, module 05's tests appear to want to test autograd stuff, which is in module 06.

I worked around this by renaming (hiding) the test_autograd_core.py and test_progressive_integration.py files in that directory.

Issue 2: After noting the issue above, tito module test 04 started failing for me from test_loss_gradients.py

Potential root cause: It appears that that file is called for module 04's test, and indeed wants to pull in SGD, which (I assume) would be built in module 07 (optimizers).

I worked around this by replacing 4: ["test_loss_gradients.py"], with 4: [],


I apologize if I ran into these problems by doing something out of sequence accidentally.

Thanks again for the wonderful resource!

Originally created by @avikde on GitHub (Jan 21, 2026). Original GitHub issue: https://github.com/harvard-edge/cs249r_book/issues/1127 Originally assigned to: @profvjreddi on GitHub. First, thanks very much for this wonderful resource, as well as the mlsysbook! I also understand that TinyTorch is in a pre-release state, and just hope that this feedback is helpful. --- **Issue 1:** The tests for module 05 did not pass for me after sequentially going from 1 -> 5 **Potential root cause:** It appears that maybe the module order used to be different in the past, but in the current state, module 05's tests [appear to want to test autograd stuff](https://github.com/harvard-edge/cs249r_book/tree/tinytorch-v0.1.3/tinytorch/tests/05_dataloader), which is in module 06. I worked around this by renaming (hiding) the `test_autograd_core.py` and `test_progressive_integration.py` files in that directory. **Issue 2:** After noting the issue above, `tito module test 04` started failing for me from `test_loss_gradients.py` **Potential root cause:** It appears that [that file is called for module 04's test](https://github.com/harvard-edge/cs249r_book/blob/tinytorch-v0.1.3/tinytorch/tito/commands/module/test.py#L212), and indeed [wants to pull in SGD](https://github.com/harvard-edge/cs249r_book/blob/tinytorch-v0.1.3/tinytorch/tests/integration/test_loss_gradients.py#L29), which (I assume) would be built in module 07 (optimizers). I worked around this by replacing `4: ["test_loss_gradients.py"],` with `4: [],` --- I apologize if I ran into these problems by doing something out of sequence accidentally. Thanks again for the wonderful resource!
GiteaMirror added the type: bugarea: tinytorch labels 2026-04-11 08:03:04 -05:00
Author
Owner

@profvjreddi commented on GitHub (Jan 21, 2026):

Hi there, @avikde — thank you for your patience and for being helpful. I do have a bug fix that I just haven't officially pushed, so the bug is still there. I'll try to do a release later this evening, once I get home.

I agree with the ordering of the module. It had changed it. I am debugging it now.

<!-- gh-comment-id:3781673966 --> @profvjreddi commented on GitHub (Jan 21, 2026): Hi there, @avikde — thank you for your patience and for being helpful. I do have a bug fix that I just haven't officially pushed, so the bug is still there. I'll try to do a release later this evening, once I get home. I agree with the ordering of the module. It had changed it. I am debugging it now.
Author
Owner

@profvjreddi commented on GitHub (Jan 22, 2026):

Status: Fixed

The issues you identified were correct. We've made the following fixes:

  1. Moved test_autograd_core.py from tests/05_dataloader/ to tests/06_autograd/ - this file was testing autograd functionality (Module 06) but was incorrectly placed in the dataloader test directory (Module 05).

  2. Updated the integration test mapping in tito/commands/module/test.py:

    • Module 04: Removed test_loss_gradients.py (it imports SGD from Module 07)
    • Module 06: Removed test_gradient_flow.py (it imports optimizers from Module 07)
    • Module 07: Now runs all the gradient/training tests since optimizers are available

The root cause was that integration tests were being mapped to modules before their dependencies were available. Tests should only use features from modules ≤ the current module number.

Thanks for the detailed report - it helped me identify several (other) test ordering issues!

<!-- gh-comment-id:3784231061 --> @profvjreddi commented on GitHub (Jan 22, 2026): **Status: Fixed** ✅ The issues you identified were correct. We've made the following fixes: 1. **Moved `test_autograd_core.py`** from `tests/05_dataloader/` to `tests/06_autograd/` - this file was testing autograd functionality (Module 06) but was incorrectly placed in the dataloader test directory (Module 05). 2. **Updated the integration test mapping** in `tito/commands/module/test.py`: - Module 04: Removed `test_loss_gradients.py` (it imports SGD from Module 07) - Module 06: Removed `test_gradient_flow.py` (it imports optimizers from Module 07) - Module 07: Now runs all the gradient/training tests since optimizers are available The root cause was that integration tests were being mapped to modules before their dependencies were available. Tests should only use features from modules ≤ the current module number. Thanks for the detailed report - it helped me identify several (other) test ordering issues!
Author
Owner

@profvjreddi commented on GitHub (Jan 22, 2026):

@all-contributors please add @avikde for bug, test

<!-- gh-comment-id:3784503023 --> @profvjreddi commented on GitHub (Jan 22, 2026): @all-contributors please add @avikde for bug, test
Author
Owner

@avikde commented on GitHub (Jan 22, 2026):

Thanks @profvjreddi - feel free to close the issue whenever is best for your workflow.

<!-- gh-comment-id:3784604916 --> @avikde commented on GitHub (Jan 22, 2026): Thanks @profvjreddi - feel free to close the issue whenever is best for your workflow.
Author
Owner

@profvjreddi commented on GitHub (Jan 22, 2026):

v0.1.4 is now released and should fix the issues you reported:

  • Issue 1 (Module 05 tests failing): Moved test_autograd_core.py from tests/05_dataloader/ to tests/06_autograd/ where it belongs
  • Issue 2 (Module 04 test_loss_gradients failing): Removed test_loss_gradients.py from Module 04's test mapping since it requires SGD from Module 07

To update, try:

tito system update

If that doesn't work (older versions), you can re-run the install script which will preserve your work:

curl -sSL mlsysbook.ai/tinytorch/install.sh | bash

If you get a chance to verify the full module journey works now, that would be awesome!

Also - you've been added to the TinyTorch Contributors list. It's a small recognition, but I'm hoping folks like you who help improve TinyTorch will eventually teach this material and help spread the learning to others. Thanks for being part of this! 🙏

<!-- gh-comment-id:3787428150 --> @profvjreddi commented on GitHub (Jan 22, 2026): v0.1.4 is now released and should fix the issues you reported: - **Issue 1 (Module 05 tests failing):** Moved `test_autograd_core.py` from `tests/05_dataloader/` to `tests/06_autograd/` where it belongs - **Issue 2 (Module 04 test_loss_gradients failing):** Removed `test_loss_gradients.py` from Module 04's test mapping since it requires SGD from Module 07 To update, try: ```bash tito system update ``` If that doesn't work (older versions), you can re-run the install script which will preserve your work: ```bash curl -sSL mlsysbook.ai/tinytorch/install.sh | bash ``` If you get a chance to verify the full module journey works now, that would be awesome\! Also - you've been added to the [TinyTorch Contributors](https://github.com/harvard-edge/cs249r_book?tab=readme-ov-file#-tinytorch-contributors) list. It's a small recognition, but I'm hoping folks like you who help improve TinyTorch will eventually teach this material and help spread the learning to others. Thanks for being part of this\! 🙏
Author
Owner

@avikde commented on GitHub (Jan 23, 2026):

Thanks so much @profvjreddi for the fix, and the incredible work on tinytorch as well as mlsysbook. The fix looks good to me.

<!-- gh-comment-id:3790478815 --> @avikde commented on GitHub (Jan 23, 2026): Thanks so much @profvjreddi for the fix, and the incredible work on tinytorch as well as mlsysbook. The fix looks good to me.
Author
Owner

@profvjreddi commented on GitHub (Jan 23, 2026):

Thanks so much for the kind words, @avikde — these interactions are what keeps me motivated! 🙏

Before you try v0.1.4, please hang on just a bit longer. I just discovered another bug and will be releasing v0.1.5 shortly with the fix. I'll update this thread once it's out.

Really appreciate you engaging and helping make TinyTorch better!

<!-- gh-comment-id:3790513127 --> @profvjreddi commented on GitHub (Jan 23, 2026): Thanks so much for the kind words, @avikde — these interactions are what keeps me motivated! 🙏 Before you try v0.1.4, please hang on just a bit longer. I just discovered another bug and will be releasing v0.1.5 shortly with the fix. I'll update this thread once it's out. Really appreciate you engaging and helping make TinyTorch better!
Author
Owner

@profvjreddi commented on GitHub (Feb 19, 2026):

Hi @avikde, your reports on the autograd and module ordering issues (#1127, #1128) caught real dependency bugs that were important to fix. Thanks for the careful testing.

We're having a TinyTorch community meetup on Tuesday, March 3rd at 9am and would love to hear from you. Even a few minutes about what you're working on, why you were interested in TinyTorch, or any thoughts on building ML frameworks from scratch.

You're among our first contributors, and we'd like to send a small thank you. Check Discord for more details!

<!-- gh-comment-id:3929785709 --> @profvjreddi commented on GitHub (Feb 19, 2026): Hi @avikde, your reports on the autograd and module ordering issues (#1127, #1128) caught real dependency bugs that were important to fix. Thanks for the careful testing. We're having a TinyTorch community meetup on **Tuesday, March 3rd at 9am** and would love to hear from you. Even a few minutes about what you're working on, why you were interested in TinyTorch, or any thoughts on building ML frameworks from scratch. You're among our first contributors, and we'd like to send a small thank you. Check Discord for more details!
Author
Owner

@avikde commented on GitHub (Feb 20, 2026):

Hi @avikde, your reports on the autograd and module ordering issues (#1127, #1128) caught real dependency bugs that were important to fix. Thanks for the careful testing.

We're having a TinyTorch community meetup on Tuesday, March 3rd at 9am and would love to hear from you. Even a few minutes about what you're working on, why you were interested in TinyTorch, or any thoughts on building ML frameworks from scratch.

You're among our first contributors, and we'd like to send a small thank you. Check Discord for more details!

@profvjreddi thanks for the appreciation. I really love and have benefited from the portions of the ML sys book and tinytorch notebooks I've seen, so it was the least I could do. Sure, I can join the March 3rd call and share my perspective for 1-2 minutes, just let me know how to be prepared. I'm not extremely familiar with discord but you're referring to the Edge AI Foundation server, correct?

<!-- gh-comment-id:3935609393 --> @avikde commented on GitHub (Feb 20, 2026): > Hi [@avikde](https://github.com/avikde), your reports on the autograd and module ordering issues ([#1127](https://github.com/harvard-edge/cs249r_book/issues/1127), [#1128](https://github.com/harvard-edge/cs249r_book/issues/1128)) caught real dependency bugs that were important to fix. Thanks for the careful testing. > > We're having a TinyTorch community meetup on **Tuesday, March 3rd at 9am** and would love to hear from you. Even a few minutes about what you're working on, why you were interested in TinyTorch, or any thoughts on building ML frameworks from scratch. > > You're among our first contributors, and we'd like to send a small thank you. Check Discord for more details! @profvjreddi thanks for the appreciation. I really love and have benefited from the portions of the ML sys book and tinytorch notebooks I've seen, so it was the least I could do. Sure, I can join the March 3rd call and share my perspective for 1-2 minutes, just let me know how to be prepared. I'm not extremely familiar with discord but you're referring to the Edge AI Foundation server, correct?
Author
Owner

@profvjreddi commented on GitHub (Feb 24, 2026):

Hi @avikde,

Thanks for your interest in the TinyTorch community meetup on Tuesday, March 3rd at 9am. To get you set up as a speaker and share logistics, we need a few details from you.

Please:

  1. Reply to: karijanapareddi@gmail.com
    CC: vj@eecs.harvard.edu and andreamattia.garavagno@santannapisa.it

  2. Use the email address you want us to use for Zoom registration and for promoting you to panelist so you can speak on the call (it's a webinar-style meeting).

  3. Slide We'd love it if you could share a slide or two about your experience, you can add them here—there's a template to follow:
    https://docs.google.com/presentation/d/1h0bQZJVtmXYuO4jgakE3x3xGt0e8fNsvW7QfWK1_5D4/edit?slide=id.g3cac3cc65ae_0_19#slide=id.g3cac3cc65ae_0_19

We'll send logistical details (Zoom link, agenda, etc.) to your registered email.

Looking forward to having you on the call.

<!-- gh-comment-id:3952969729 --> @profvjreddi commented on GitHub (Feb 24, 2026): Hi @avikde, Thanks for your interest in the TinyTorch community meetup on **Tuesday, March 3rd at 9am**. To get you set up as a speaker and share logistics, we need a few details from you. **Please:** 1. **Reply to:** **karijanapareddi@gmail.com** **CC:** vj@eecs.harvard.edu and andreamattia.garavagno@santannapisa.it 2. **Use the email address** you want us to use for Zoom registration and for promoting you to **panelist** so you can speak on the call (it's a webinar-style meeting). 3. **Slide** We'd love it if you could share a slide or two about your experience, you can add them here—there's a template to follow: https://docs.google.com/presentation/d/1h0bQZJVtmXYuO4jgakE3x3xGt0e8fNsvW7QfWK1_5D4/edit?slide=id.g3cac3cc65ae_0_19#slide=id.g3cac3cc65ae_0_19 We'll send logistical details (Zoom link, agenda, etc.) to your registered email. Looking forward to having you on the call.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#1700