[GH-ISSUE #1547] [Bug] Module complete 05 doesn't work #10813

Closed
opened 2026-05-12 18:49:31 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @kkkamur07 on GitHub (Apr 26, 2026).
Original GitHub issue: https://github.com/harvard-edge/cs249r_book/issues/1547

Originally assigned to: @profvjreddi on GitHub.

Area

Book — Volume I

Location

Module 05 DataLoaders

Description

When I run

tito module complete 05

it returns

Phase 2: Integration Tests (progressive integration)

   ❌ CompleteMLPipelineStillWorks: End To End Ml Pipeline Stable
      Test failed (see output for details)
   ❌ CompleteMLPipelineStillWorks: Attention And Spatial Integration Stable
      Test failed (see output for details)
   ❌ Module 09AutogradCore: Variable Wrapper Exists
      Test failed (see output for details)
   ❌ Module 09AutogradCore: Gradient Computation
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'
   ❌ Module 09AutogradCore: Computation Graph Building
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'
   ❌ AutogradIntegration: Autograd With Layers
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'
   ❌ AutogradIntegration: Autograd With Spatial Operations
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'
   ❌ AutogradIntegration: Autograd With Attention
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'
   ❌ GradientBasedLearningFoundation: Parameter Gradient Computation
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'
   ❌ GradientBasedLearningFoundation: Loss Function Gradients
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'
   ❌ GradientBasedLearningFoundation: Optimization Readiness
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'
   ❌ Module 09Completion: Autograd Foundation Complete
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'
   ❌ FAILED
      E   ModuleNotFoundError: No module named 'tinytorch.core.spatial'

❌ Integration tests failed (13 failures)


   ❌ Tests failed for 05_dataloader
   💡 Fix the issues and try again

But when I run the test_module() in the notebook. It returns

🧪 RUNNING MODULE INTEGRATION TEST
==================================================
Running unit tests...
🔬 Unit Test: Dataset Abstract Base Class...
 Dataset is properly abstract
 Dataset interface works correctly!
🔬 Unit Test: TensorDataset...
Index out of bounds
 TensorDataset works correctly!
🔬 Unit Test: DataLoader...
 DataLoader works correctly!
🔬 Unit Test: DataLoader Deterministic Shuffling...
 Deterministic shuffling works correctly!
🔬 Unit Test: Data Augmentation...
  Testing RandomHorizontalFlip...
  Testing RandomCrop...
  Testing Compose...
  Testing Tensor compatibility...
  Testing randomness...
 Data Augmentation works correctly!

Running integration scenarios...
🔬 Integration Test: Training Workflow...
📊 Dataset splits:
  Training: 800 samples, 25 batches
  Validation: 200 samples, 7 batches

🏃 Simulated Training Loop:
  Batch 1: 32 samples
  Batch 2: 32 samples
  Batch 3: 32 samples
  Total: 25 batches, 800 samples processed
 Training integration works correctly!
🔬 Integration Test: Augmentation with DataLoader...
 Augmentation + DataLoader integration works!

==================================================
🎉 ALL TESTS PASSED! Module ready for export.
Run: tito module complete 08


🎯 AHA MOMENT: DataLoader Batches Your Data
=============================================
Dataset: 100 samples
Batch size: 32
Number of batches: 4

Batches:
  Batch 1: 32 samples, shape (32, 64)
  Batch 2: 32 samples, shape (32, 64)
  Batch 3: 32 samples, shape (32, 64)
  Batch 4: 4 samples, shape (4, 64)

 Your DataLoader organizes data for efficient training!

Please help me through this.

Expected Behavior

No response

Environment (TinyTorch bugs only)

No response

Originally created by @kkkamur07 on GitHub (Apr 26, 2026). Original GitHub issue: https://github.com/harvard-edge/cs249r_book/issues/1547 Originally assigned to: @profvjreddi on GitHub. ### Area Book — Volume I ### Location Module 05 DataLoaders ### Description When I run ```bash tito module complete 05 ``` it returns ```bash Phase 2: Integration Tests (progressive integration) ❌ CompleteMLPipelineStillWorks: End To End Ml Pipeline Stable Test failed (see output for details) ❌ CompleteMLPipelineStillWorks: Attention And Spatial Integration Stable Test failed (see output for details) ❌ Module 09AutogradCore: Variable Wrapper Exists Test failed (see output for details) ❌ Module 09AutogradCore: Gradient Computation E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ Module 09AutogradCore: Computation Graph Building E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ AutogradIntegration: Autograd With Layers E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ AutogradIntegration: Autograd With Spatial Operations E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ AutogradIntegration: Autograd With Attention E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ GradientBasedLearningFoundation: Parameter Gradient Computation E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ GradientBasedLearningFoundation: Loss Function Gradients E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ GradientBasedLearningFoundation: Optimization Readiness E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ Module 09Completion: Autograd Foundation Complete E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ FAILED E ModuleNotFoundError: No module named 'tinytorch.core.spatial' ❌ Integration tests failed (13 failures) ❌ Tests failed for 05_dataloader 💡 Fix the issues and try again ``` But when I run the `test_module()` in the notebook. It returns ```python 🧪 RUNNING MODULE INTEGRATION TEST ================================================== Running unit tests... 🔬 Unit Test: Dataset Abstract Base Class... ✅ Dataset is properly abstract ✅ Dataset interface works correctly! 🔬 Unit Test: TensorDataset... Index out of bounds ✅ TensorDataset works correctly! 🔬 Unit Test: DataLoader... ✅ DataLoader works correctly! 🔬 Unit Test: DataLoader Deterministic Shuffling... ✅ Deterministic shuffling works correctly! 🔬 Unit Test: Data Augmentation... Testing RandomHorizontalFlip... Testing RandomCrop... Testing Compose... Testing Tensor compatibility... Testing randomness... ✅ Data Augmentation works correctly! Running integration scenarios... 🔬 Integration Test: Training Workflow... 📊 Dataset splits: Training: 800 samples, 25 batches Validation: 200 samples, 7 batches 🏃 Simulated Training Loop: Batch 1: 32 samples Batch 2: 32 samples Batch 3: 32 samples Total: 25 batches, 800 samples processed ✅ Training integration works correctly! 🔬 Integration Test: Augmentation with DataLoader... ✅ Augmentation + DataLoader integration works! ================================================== 🎉 ALL TESTS PASSED! Module ready for export. Run: tito module complete 08 🎯 AHA MOMENT: DataLoader Batches Your Data ============================================= Dataset: 100 samples Batch size: 32 Number of batches: 4 Batches: Batch 1: 32 samples, shape (32, 64) Batch 2: 32 samples, shape (32, 64) Batch 3: 32 samples, shape (32, 64) Batch 4: 4 samples, shape (4, 64) ✨ Your DataLoader organizes data for efficient training! ``` Please help me through this. ### Expected Behavior _No response_ ### Environment (TinyTorch bugs only) _No response_
GiteaMirror added the area: booktype: bug labels 2026-05-12 18:49:31 -05:00
Author
Owner

@profvjreddi commented on GitHub (Apr 26, 2026):

Ah, I just fixed quite a few of these. The labs are the last part that I really need to iron out now. So thank you for sharing these, I just need to push my changes up and publish the live version! Thanks @kkkamur07

<!-- gh-comment-id:4322014952 --> @profvjreddi commented on GitHub (Apr 26, 2026): Ah, I just fixed quite a few of these. The labs are the last part that I really need to iron out now. So thank you for sharing these, I just need to push my changes up and publish the live version! Thanks @kkkamur07
Author
Owner

@profvjreddi commented on GitHub (Apr 26, 2026):

Hey @kkkamur07, thanks for the detailed bug report — the full test trace was the key to figuring this out.

Good news: this isn't a code bug in current dev, it's a stale-checkout issue. The class names in your trace (Module 09AutogradCore, CompleteMLPipelineStillWorks, AutogradIntegration, GradientBasedLearningFoundation) don't exist anywhere in the current branch — they got removed when we did a big module renumber back in January 2026. In the new layout, Module 06 is autograd and Module 09 is convolutions, and the test scaffolding around tinytorch.core.spatial looks completely different.

Could you pull the latest and try again?

git pull origin dev
tito dev export
tito module complete 05

That should pick up the post-renumber module layout and the failures should disappear. If anything still breaks after that, please reopen with the fresh trace and I'll dig back in.

Really appreciate you taking the time to file this with full output — it made the diagnosis straightforward.

<!-- gh-comment-id:4322104936 --> @profvjreddi commented on GitHub (Apr 26, 2026): Hey @kkkamur07, thanks for the detailed bug report — the full test trace was the key to figuring this out. Good news: this isn't a code bug in current dev, it's a stale-checkout issue. The class names in your trace (`Module 09AutogradCore`, `CompleteMLPipelineStillWorks`, `AutogradIntegration`, `GradientBasedLearningFoundation`) don't exist anywhere in the current branch — they got removed when we did a big module renumber back in January 2026. In the new layout, Module 06 is `autograd` and Module 09 is `convolutions`, and the test scaffolding around `tinytorch.core.spatial` looks completely different. Could you pull the latest and try again? ```bash git pull origin dev tito dev export tito module complete 05 ``` That should pick up the post-renumber module layout and the failures should disappear. If anything still breaks after that, please reopen with the fresh trace and I'll dig back in. Really appreciate you taking the time to file this with full output — it made the diagnosis straightforward.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#10813