Commit Graph

19 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
bbf1dd91c9 Add integration test to 02_tensor module: test_module_tensor_numpy_integration
- Tests tensor integration with NumPy arrays and operations
- Validates tensor-NumPy compatibility for scientific computing
- Ensures broadcasting works correctly between tensors and scalars
- Verifies integration with NumPy functions on tensor data
- Positioned before MODULE SUMMARY as per educational structure
2025-07-20 13:57:34 -04:00
Vijay Janapa Reddi
cc9cdee97d Deprecate AUTO TESTING: Remove run_module_tests_auto from all _dev.py modules. Standardize on full-module test execution for reliable, context-aware testing. 2025-07-20 13:28:10 -04:00
Vijay Janapa Reddi
98a7228bf5 Removes development headers from notebooks
Removes redundant "DEVELOPMENT" headers from several notebook files.

These headers are no longer necessary and declutter the notebook content, improving readability and focus on the core content and testing sections.
2025-07-20 12:39:21 -04:00
Vijay Janapa Reddi
51af9dd5d7 Standardize section headers for 02_tensor module 2025-07-20 12:24:40 -04:00
Vijay Janapa Reddi
c4d987cbb7 docs: Add comprehensive test documentation across all modules
 Standardized test explanations with consistent format
📝 Added markdown cells before all test functions
🎯 Improved educational clarity for student understanding

Changes:
- 01_setup: Added 2 test explanations (personal_info, system_info)
- 02_tensor: Added 3 test explanations (creation, properties, arithmetic)
- 12_compression: Added 8 test explanations (metrics, pruning, quantization, distillation, etc.)

All 15 modules now follow standardized test documentation pattern:
### 🧪 Unit Test: [Component Name]
[Brief explanation of validation purpose]

Ensures every test has clear educational context for students.
2025-07-20 10:58:08 -04:00
Vijay Janapa Reddi
c0b27e7b61 🧪 Add missing test function calls in 02_tensor module
- Added test_unit_tensor_creation() call after function definition
- Added test_unit_tensor_properties() call after function definition
- Added test_unit_tensor_arithmetic() call after function definition

Ensures test functions are actually executed when cells run, providing immediate feedback to students.
2025-07-20 10:19:56 -04:00
Vijay Janapa Reddi
c2a12fe7dd Add structural organization headers to 02_tensor module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: Tensor Foundation

Improves notebook organization without changing any code logic or content.
2025-07-20 09:54:46 -04:00
Vijay Janapa Reddi
6922b7eb31 Fix 02_tensor: Correct pattern - Tests → STANDARDIZED MODULE TESTING → Module Summary
CORRECT PATTERN NOW:
1.  Unit tests (test_unit_tensor_creation, test_unit_tensor_properties, test_unit_tensor_arithmetic)
2.  ## 🧪 Module Testing
3.  STANDARDIZED MODULE TESTING cell
4.  run_module_tests_auto call
5.  ## 🎯 Module Summary (immediately after, no code between)

 Moved test functions from after run_module_tests_auto to before ## 🧪 Module Testing
 Removed duplicate test functions from wrong location
 Clean separation: Tests → Testing → Summary
 No code between STANDARDIZED MODULE TESTING and Module Summary
2025-07-20 09:25:38 -04:00
Vijay Janapa Reddi
39ec4a725d Fix 02_tensor: Move test code to correct location
Module 02_tensor now follows the correct pattern learned from layers_dev:
1. ## 🧪 Module Testing (explanation)
2. Standardized testing cell with run_module_tests_auto
3. Actual test functions (test_unit_tensor_creation, test_unit_tensor_properties, test_unit_tensor_arithmetic)
4. ## 🎯 Module Summary

 Moved test functions from end of file to proper location after standardized testing
 Removed duplicate test functions
 Students now see actual test implementations before the summary
 run_module_tests_auto will auto-discover and run all tests
2025-07-20 09:07:32 -04:00
Vijay Janapa Reddi
48f7b2dea7 🧪 Add standardized module testing to all modules
Ensures consistent testing framework across all TinyTorch modules with:

 Added standardized testing sections to modules that were missing them:
- 01_setup: Added complete testing section + module summary
- 02_tensor: Added testing section + comprehensive module summary
- 15_mlops: Standardized existing testing section to match convention

 All modules now follow the consistent pattern:
1. ## 🧪 Module Testing (markdown explanation)
2. Locked nbgrader cell with standardized-testing ID
3. run_module_tests_auto call to discover and run all tests
4. ## 🎯 Module Summary (educational wrap-up)

 Benefits:
- Consistent testing experience across all 16 modules
- Automatic test discovery and execution before module completion
- Standardized educational flow: learn → implement → test → reflect
- Professional testing practices with locked testing framework

 Verification: All 16 modules now have both:
- '## 🧪 Module Testing' section ✓
- 'run_module_tests_auto' call ✓

This ensures students always verify their implementations work correctly
before moving to the next module, following TinyTorch's educational philosophy.
2025-07-20 09:00:17 -04:00
Vijay Janapa Reddi
35bf079749 🧹 Remove backup files - Clean repository maintenance
- Delete 8 *_backup.py files from modules/source directories
- Remove tito/commands/test.py.backup file
- Eliminates obsolete backup files from version control
- Keeps repository clean and focused on current implementations
- Reduces repository size and improves maintainability

Removed files:
- modules/source/02_tensor/tensor_dev_backup.py
- modules/source/03_activations/activations_dev_backup.py
- modules/source/04_layers/layers_dev_backup.py
- modules/source/05_dense/dense_dev_backup.py
- modules/source/06_spatial/spatial_dev_backup.py
- modules/source/08_dataloader/dataloader_dev_backup.py
- modules/source/09_autograd/autograd_dev_backup.py
- modules/source/13_kernels/kernels_dev_backup.py
- tito/commands/test.py.backup
2025-07-20 08:42:59 -04:00
Vijay Janapa Reddi
771ed98a80 🧹 Remove Jupyter notebooks from modules/source - Python-first workflow
- Delete all 15 .ipynb files from modules/source directories
- Align with TinyTorch's Python-first development philosophy
- .py files are the source of truth, .ipynb files are temporary outputs
- Prevents version control conflicts with notebook metadata
- Students work directly with .py files using Jupytext format
- Notebooks can be regenerated when needed via 'tito nbdev generate'

Removed files:
- All *_dev.ipynb files across modules 01-15
- Keeps repository clean and focused on source code
2025-07-20 08:41:26 -04:00
Vijay Janapa Reddi
82e18761fe Foundation: Standardize test naming in setup and tensor modules
- Rename test functions to follow test_unit_<name> convention
- Setup module: test_personal_info → test_unit_personal_info_basic
- Setup module: test_system_info → test_unit_system_info_basic
- Tensor module: test_tensor_* → test_unit_tensor_*
- Establishes consistent unit test naming for core foundation modules
2025-07-20 08:38:46 -04:00
Vijay Janapa Reddi
dc77c3de0e docs: Clean up whitespace and formatting in module READMEs
- Fixed trailing whitespace in several module README files
- Ensures consistent formatting across all documentation
2025-07-16 11:50:23 -04:00
Vijay Janapa Reddi
507cdf50f5 refactor: Implement YAML-based difficulty and time system
- Added educational metadata (difficulty, time_estimate) to all module.yaml files
- Updated convert_readmes.py to read from YAML instead of hardcoded mappings
- Standardized difficulty progression: 🥷
- Fixed path resolution for YAML reading in book build process
- Eliminated duplication: single source of truth for educational metadata
- Capstone gets special ninja treatment (🥷) as beyond-expert level
2025-07-16 11:48:09 -04:00
Vijay Janapa Reddi
6fa4bde3d1 Fix tensor module learning objectives formatting
- Added bold formatting to match other modules' style
- Enhanced clarity with more specific descriptors
- Added 'efficiently' and 'with proper broadcasting' for precision
- Now consistent with activations and other modules formatting
- Improves visual hierarchy and readability in built book
2025-07-16 08:32:25 -04:00
Vijay Janapa Reddi
9f8a5a8aa3 PILOT: Implement standardized module README structure (Tensor module)
New Standard Structure Applied:
 📊 Module Info - Consistent difficulty, time, prerequisites
 🎯 Learning Objectives - Clear, measurable outcomes
 🧠 Build → Use → Understand - Pedagogical framework
 📚 What You'll Build - Concrete code examples
 🚀 Getting Started - Prerequisites check + workflow
 🧪 Testing Your Implementation - Inline + module + manual tests
 🎯 Key Concepts - Real-world connections + core ideas
 🎉 Ready to Build? - Motivational ending + grid cards

Benefits for Students:
- Predictable navigation structure
- Clear learning outcomes upfront
- Concrete examples of what they'll build
- Multiple testing approaches for confidence
- Real-world context for motivation

Benefits for Instructors:
- Professional consistency across modules
- Clear pedagogical progression
- Easy to maintain and update
- Coherent course experience

Next: Review this pilot, then apply to remaining 13 modules
2025-07-16 01:31:00 -04:00
Vijay Janapa Reddi
074f695fb3 Generate notebook files from Python modules for direct access 2025-07-15 23:51:56 -04:00
Vijay Janapa Reddi
d82c75f9dc Renumber modules from 00-13 to 01-14 for natural numbering
 Rename all module directories: 00_setup → 01_setup, etc.
 Update convert_modules.py mappings for new directory names
 Update _toc.yml file paths and titles (1-14 instead of 0-13)
 Regenerate all overview pages with new numbering
 Fix all broken references in usage-paths and intro
 Update chapter references to use natural numbering

Benefits:
- More intuitive course progression starting from 1
- Matches academic course numbering conventions
- Eliminates confusion about 'Module 0' concept
- Cleaner mental model for students and instructors
- All references and links properly updated

Complete transformation: 14 modules now numbered 01-14
2025-07-15 18:51:36 -04:00