mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-05-06 09:32:39 -05:00
🎯 Issues Fixed: 1. MockTensor Scalar Handling: Fix np.array([data]) → np.array(data) for scalar shape () 2. Index Bounds Validation: Add negative index check (index < 0) to MockDataset.__getitem__ 3. DataLoader Input Validation: Add proper validation for batch_size > 0 and dataset ≠ None ✅ Impact: 06_dataloader external tests now pass 28/28 (was 19/28) 🔧 Technical Changes: - MockTensor: Handle scalars correctly to create shape () instead of (1,) - MockDataset: Validate negative indices to raise IndexError as expected - DataLoader: Add robust input validation with proper error messages - All issues were legitimate implementation problems, not test issues This completes the systematic external test fixing across all 4 modules with failures.