mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-07-18 00:44:29 -05:00
[GH-ISSUE #1127] With tinytorch 0.1.3, module 05 tests don't pass #21475
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.pyandtest_progressive_integration.pyfiles in that directory.Issue 2: After noting the issue above,
tito module test 04started failing for me fromtest_loss_gradients.pyPotential 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"],with4: [],I apologize if I ran into these problems by doing something out of sequence accidentally.
Thanks again for the wonderful resource!
@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.
@profvjreddi commented on GitHub (Jan 22, 2026):
Status: Fixed ✅
The issues you identified were correct. We've made the following fixes:
Moved
test_autograd_core.pyfromtests/05_dataloader/totests/06_autograd/- this file was testing autograd functionality (Module 06) but was incorrectly placed in the dataloader test directory (Module 05).Updated the integration test mapping in
tito/commands/module/test.py:test_loss_gradients.py(it imports SGD from Module 07)test_gradient_flow.py(it imports optimizers from Module 07)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!
@profvjreddi commented on GitHub (Jan 22, 2026):
@all-contributors please add @avikde for bug, test
@avikde commented on GitHub (Jan 22, 2026):
Thanks @profvjreddi - feel free to close the issue whenever is best for your workflow.
@profvjreddi commented on GitHub (Jan 22, 2026):
v0.1.4 is now released and should fix the issues you reported:
test_autograd_core.pyfromtests/05_dataloader/totests/06_autograd/where it belongstest_loss_gradients.pyfrom Module 04's test mapping since it requires SGD from Module 07To update, try:
If that doesn't work (older versions), you can re-run the install script which will preserve your work:
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! 🙏
@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.
@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!
@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!
@avikde commented on GitHub (Feb 20, 2026):
@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?
@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:
Reply to: karijanapareddi@gmail.com
CC: vj@eecs.harvard.edu and andreamattia.garavagno@santannapisa.it
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).
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.