Commit Graph

18 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
c366e9d1c2 Standardize NBGrader formatting and fix test execution patterns across all modules
This comprehensive update ensures all TinyTorch modules follow consistent NBGrader
formatting guidelines and proper Python module structure:

- Fix test execution patterns: All test calls now wrapped in if __name__ == "__main__" blocks
- Add ML Systems Thinking Questions to modules missing them
- Standardize NBGrader formatting (BEGIN/END SOLUTION blocks, STEP-BY-STEP, etc.)
- Remove unused imports across all modules
- Fix syntax errors (apostrophes, special characters)
- Ensure modules can be imported without running tests

Affected modules: All 17 development modules (00-16)
Agent workflow: Module Developer → QA Agent → Package Manager coordination
Testing: Comprehensive QA validation completed
2025-09-16 19:48:54 -04:00
Vijay Janapa Reddi
4fced96023 Fix module test execution issues
- Fixed test functions to only run when modules executed directly
- Added proper __name__ == '__main__' guards to all test calls
- Fixed syntax errors from incorrect replacements in Module 13 and 15
- Modules now import properly without executing tests
- ProductionBenchmarkingProfiler (Module 14) and ProductionMLSystemProfiler (Module 16) fully working
- Other profiler classes present but require full numpy environment to test completely
2025-09-16 00:17:32 -04:00
Vijay Janapa Reddi
7bacceef17 Removes development headers
Removes development headers from several files.

These headers were used during the development process and are no longer needed.
2025-07-20 17:41:57 -04:00
Vijay Janapa Reddi
1fe50738cf Add section organization to 10_optimizers module: Add DEVELOPMENT section header
- Insert ## 🔧 DEVELOPMENT header before first test function
- Organizes module according to educational structure guidelines
- Maintains all existing functionality and test execution
- Improves readability and navigation for educational use
2025-07-20 14:06:19 -04:00
Vijay Janapa Reddi
21f1199fad Improves clarity of visual understanding sections
Updates loss landscape descriptions to be more easily understood.

Replaces symbols with clearer text in visual explanations of optimizers.
2025-07-20 13:49:40 -04:00
Vijay Janapa Reddi
38aee6ab19 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
2e80c52f8c Update test function names from test_integration_* to test_module_* for clearer cross-module testing semantics 2025-07-20 13:03:52 -04:00
Vijay Janapa Reddi
c36c04aefc Renames training integration test function
Updates the name of the unit test function for training
integration to improve clarity and consistency.

This change ensures the test function name accurately
reflects its purpose.
2025-07-20 12:59:58 -04:00
Vijay Janapa Reddi
99b32d2719 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
0c5f554aa8 Standardize section headers for 10_optimizers module 2025-07-20 12:30:05 -04:00
Vijay Janapa Reddi
9869308a51 Fix test naming and enhance plot detection 2025-07-20 12:20:00 -04:00
Vijay Janapa Reddi
a80d068a10 🧪 Add missing test function call in 10_optimizers module
- Added test_unit_gradient_descent_step() call after function definition

Ensures the gradient descent step test function is executed when cells run, providing immediate feedback to students.
2025-07-20 10:32:21 -04:00
Vijay Janapa Reddi
9e9bcde974 Add structural organization headers to 10_optimizers module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: Optimization Algorithms

Improves notebook organization without changing any code logic or content.
2025-07-20 10:06:38 -04:00
Vijay Janapa Reddi
8126147222 PROPERLY Fix 10_optimizers: Integration test BEFORE testing, correct STANDARDIZED MODULE TESTING structure
CORRECTED PATTERN NOW:
1.  Integration test (test_module_optimizer_autograd_compatibility) - BEFORE ## 🧪 Module Testing
2.  ## 🧪 Module Testing (markdown section)
3.  STANDARDIZED MODULE TESTING (nbgrader cell with proper structure)
4.  if __name__ == '__main__' block with run_module_tests_auto
5.  ## �� Module Summary (immediately after, no code between)

FIXES APPLIED:
 Moved integration test function from AFTER testing section to BEFORE it
 Removed duplicate integration test function
 Clean STANDARDIZED MODULE TESTING structure with proper nbgrader cell
 No extra code between run_module_tests_auto and Module Summary

Module 10_optimizers now follows the EXACT pattern the user specified
2025-07-20 09:39:34 -04:00
Vijay Janapa Reddi
e95801229a Fix 10_optimizers: Move Module Summary AFTER STANDARDIZED MODULE TESTING
CORRECTED ORDER:
 BEFORE: Module Summary (line 1391) → STANDARDIZED MODULE TESTING (wrong order)
 AFTER: Integration tests → STANDARDIZED MODULE TESTING → Module Summary 

Changes:
1.  Removed Module Summary from wrong location (before testing section)
2.  Added Module Summary after run_module_tests_auto call
3.  Correct pattern: ## 🧪 Module Testing (1392) → ## 🎯 Module Summary (1456)
4.  No code between STANDARDIZED MODULE TESTING and Module Summary

Module 10_optimizers now follows the exact pattern the user requested
2025-07-20 09:31:50 -04:00
Vijay Janapa Reddi
8cbb3b6543 Fix 10_optimizers: Move STANDARDIZED MODULE TESTING before Module Summary
CORRECTED ORDER:
 BEFORE: Module Summary (line 1389) → STANDARDIZED MODULE TESTING (line 1469) 
 AFTER: STANDARDIZED MODULE TESTING → Module Summary 

Changes:
- Moved complete testing section (Module Testing + standardized cell + integration tests + run_module_tests_auto) to line 1389
- Moved Module Summary section to follow after testing
- Removed duplicate testing sections
- Now follows correct pattern: Testing → Summary

Module 10_optimizers now has proper ordering
2025-07-20 09:18:49 -04:00
Vijay Janapa Reddi
8f99f0e61a 🚀 Training System: Standardize test naming in ML training pipeline
- DataLoader: test_integration_* → test_module_* (module dependency tests)
- Autograd: test_variable_class → test_unit_variable_class
- Autograd: test_add_operation → test_unit_add_operation
- Autograd: test_multiply_operation → test_unit_multiply_operation
- Autograd: test_subtract_operation → test_unit_subtract_operation
- Autograd: test_chain_rule → test_unit_chain_rule
- Autograd: test_neural_network_training → test_module_neural_network_training
- Optimizers: test_integration_* → test_module_* (module dependency tests)
- Training: All test_* → test_unit_* except test_training → test_module_training
- Completes test standardization for complete training pipeline
2025-07-20 08:39:13 -04:00
Vijay Janapa Reddi
9d637e80ef refactor: Implement learner-focused module progression with better naming
 Renamed modules for clearer pedagogical flow:
- 05_networks → 05_dense (multi-layer dense/fully connected networks)
- 06_cnn → 06_spatial (convolutional networks for spatial patterns)
- 06_attention → 07_attention (attention mechanisms for sequences)

 Shifted remaining modules down by 1:
- 07_dataloader → 08_dataloader
- 08_autograd → 09_autograd
- 09_optimizers → 10_optimizers
- 10_training → 11_training
- 11_compression → 12_compression
- 12_kernels → 13_kernels
- 13_benchmarking → 14_benchmarking
- 14_mlops → 15_mlops
- 15_capstone → 16_capstone

 Updated module metadata (module.yaml files):
- Updated names, descriptions, dependencies
- Fixed prerequisite chains and enables relationships
- Updated export paths to match new names

New learner progression:
Foundation → Individual Layers → Dense Networks → Spatial Networks → Attention Networks → Training Pipeline

Perfect pedagogical flow: Build one layer → Stack dense layers → Add spatial patterns → Add attention mechanisms → Learn to train them all.
2025-07-18 00:12:50 -04:00