Commit Graph

156 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
41af96f984 Standardize section headers for 05_dense module 2025-07-20 12:26:47 -04:00
Vijay Janapa Reddi
3c008c7734 Standardize section headers for 04_layers module 2025-07-20 12:25:54 -04:00
Vijay Janapa Reddi
b3968617e1 Standardize section headers for 03_activations module 2025-07-20 12:25:17 -04:00
Vijay Janapa Reddi
0ac58676a2 Standardize section headers for 02_tensor module 2025-07-20 12:24:40 -04:00
Vijay Janapa Reddi
0b8f78dfec Standardize section headers for 01_setup module 2025-07-20 12:24:02 -04:00
Vijay Janapa Reddi
9869308a51 Fix test naming and enhance plot detection 2025-07-20 12:20:00 -04:00
Vijay Janapa Reddi
fb1f8feab3 Replace manual test calls with automatic discovery 2025-07-20 12:19:49 -04:00
Vijay Janapa Reddi
ec3537c0fc Separate plot functions from test execution 2025-07-20 12:19:39 -04:00
Vijay Janapa Reddi
9a658a53aa 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
411afb43b3 🧪 Fix test function name mismatches in 15_mlops module
- Fixed test_model_monitor() → test_unit_model_monitor()
- Fixed test_drift_detector() → test_unit_drift_detector()
- Fixed test_retraining_trigger() → test_unit_retraining_trigger()
- Fixed test_mlops_pipeline() → test_unit_mlops_pipeline()
- Fixed test_comprehensive_integration() → test_module_comprehensive_mlops()

Ensures correct function names are called to match their definitions.
2025-07-20 10:45:27 -04:00
Vijay Janapa Reddi
b37c8fec11 🧪 Add missing test function calls and fix name mismatches in 14_benchmarking module
- Added test_unit_benchmark_scenarios() call after function definition
- Fixed test_statistical_validation() → test_unit_statistical_validation()
- Added test_unit_tinytorch_perf() call after function definition
- Fixed test_performance_reporter() → test_unit_performance_reporter()
- Fixed test_comprehensive_benchmarking() → test_module_comprehensive_benchmarking()

Ensures all test functions are executed when cells run, providing immediate feedback to students.
2025-07-20 10:42:38 -04:00
Vijay Janapa Reddi
96dfbf3389 🧪 Fix test function name mismatches in 13_kernels module
- Fixed test_matmul_baseline() → test_unit_matmul_baseline()
- Fixed test_vectorized_operations() → test_unit_vectorized_operations()
- Fixed test_cache_friendly_matmul() → test_unit_cache_friendly_matmul()
- Fixed test_parallel_processing() → test_unit_parallel_processing()
- Fixed test_simple_kernel_timing() → test_unit_simple_kernel_timing()
- Fixed test_compressed_kernels() → test_unit_compressed_kernels()

Ensures correct function names are called to match their definitions.
2025-07-20 10:40:21 -04:00
Vijay Janapa Reddi
cc3ca453ad 🧪 Add missing test function calls and fix name mismatches in 12_compression module
- Added test_unit_compression_metrics() call and fixed name mismatch
- Added test_unit_magnitude_pruning() call and fixed name mismatch
- Added test_unit_quantization() call and fixed name mismatch
- Added test_unit_distillation() call and fixed name mismatch
- Added test_unit_structured_pruning() call and fixed name mismatch
- Added test_unit_comprehensive_comparison() call and fixed name mismatch

Ensures all test functions are executed when cells run, providing immediate feedback to students.
2025-07-20 10:38:22 -04:00
Vijay Janapa Reddi
57d7f2cf6c 🧪 Add missing test function calls and fix name mismatches in 11_training module
- Added test_unit_mse_loss() call after function definition
- Added test_unit_crossentropy_loss() call after function definition
- Added test_unit_binary_crossentropy_loss() call after function definition
- Fixed test_accuracy_metric() → test_unit_accuracy_metric()
- Fixed test_trainer() → test_unit_trainer()
- Fixed test_training() → test_module_training()

Ensures all test functions are executed when cells run, providing immediate feedback to students.
2025-07-20 10:35:19 -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
2ee37a10ed 🧪 Add missing test function calls and fix name mismatches in 09_autograd module
- Added test_unit_variable_class() call after function definition
- Added test_unit_add_operation() call after function definition
- Added test_unit_multiply_operation() call after function definition
- Added test_unit_subtract_operation() call after function definition
- Added test_unit_chain_rule() call after function definition
- Added test_module_neural_network_training() call after function definition
- Fixed function name mismatches in existing if __name__ == '__main__' calls

Ensures all test functions are executed when cells run, providing immediate feedback to students.
2025-07-20 10:30:51 -04:00
Vijay Janapa Reddi
475bc7e94a 🧪 Add missing test function calls in 07_attention module
- Added test_unit_attention_mechanism() call after function definition
- Added test_unit_self_attention_wrapper() call after function definition
- Added test_unit_masking_utilities() call after function definition

Ensures all test functions are executed when cells run, providing immediate feedback to students.
2025-07-20 10:27:34 -04:00
Vijay Janapa Reddi
4787656494 🧪 Add missing test function calls in 06_spatial module
- Added test_unit_convolution_operation() call after function definition
- Added test_unit_conv2d_layer() call after function definition
- Added test_unit_flatten_function() call after function definition

Ensures all test functions are executed when cells run, providing immediate feedback to students.
2025-07-20 10:26:11 -04:00
Vijay Janapa Reddi
4678282096 🧪 Add missing test function calls in 05_dense module
- Added test_unit_network_architectures() call (first instance)
- Added test_unit_sequential_networks() call
- Added test_unit_mlp_creation() call
- Added test_unit_network_architectures() call (second instance)
- Added test_unit_network_applications() call

Ensures all test functions are executed when cells run, providing immediate feedback to students.
2025-07-20 10:24:51 -04:00
Vijay Janapa Reddi
34dcb8a68f 🧪 Fix test function name mismatches in 04_layers module
- Fixed test_matrix_multiplication() → test_unit_matrix_multiplication()
- Fixed test_dense_layer() → test_unit_dense_layer()
- Fixed test_layer_activation() → test_unit_layer_activation()

Ensures correct function names are called to match their definitions.
2025-07-20 10:22:11 -04:00
Vijay Janapa Reddi
ec1c358ecb 🧪 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
8e03317bd3 🧪 Add missing test function calls in 01_setup module
- Added test_unit_personal_info_basic() call after function definition
- Added test_unit_system_info_basic() call after function definition

Ensures test functions are actually executed when cells run, providing immediate feedback to students.
2025-07-20 10:18:52 -04:00
Vijay Janapa Reddi
a9cccdac35 Add structural organization headers to 15_mlops module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: MLOps Production Systems

Improves notebook organization without changing any code logic or content.
2025-07-20 10:11:44 -04:00
Vijay Janapa Reddi
c07111b4e8 Add structural organization headers to 14_benchmarking module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: Performance Benchmarking

Improves notebook organization without changing any code logic or content.
2025-07-20 10:10:44 -04:00
Vijay Janapa Reddi
b60087c21d Add structural organization headers to 13_kernels module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: Hardware-Optimized Operations

Improves notebook organization without changing any code logic or content.
2025-07-20 10:09:46 -04:00
Vijay Janapa Reddi
0c3584f41c Add structural organization headers to 12_compression module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: Model Compression

Improves notebook organization without changing any code logic or content.
2025-07-20 10:08:42 -04:00
Vijay Janapa Reddi
c6a890be83 Add structural organization headers to 11_training module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: Neural Network Training

Improves notebook organization without changing any code logic or content.
2025-07-20 10:07:38 -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
1477597587 Add structural organization headers to 09_autograd module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: Automatic Differentiation

Improves notebook organization without changing any code logic or content.
2025-07-20 10:02:41 -04:00
Vijay Janapa Reddi
a63f0aa221 Add structural organization headers to 08_dataloader module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before auto testing block
- Updated to ## 🎯 MODULE SUMMARY: Data Loading Systems

Improves notebook organization without changing any code logic or content.
2025-07-20 10:01:34 -04:00
Vijay Janapa Reddi
ecd32a02eb Add structural organization headers to 07_attention module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before auto testing block
- Updated to ## 🎯 MODULE SUMMARY: Attention Mechanisms

Improves notebook organization without changing any code logic or content.
2025-07-20 10:00:33 -04:00
Vijay Janapa Reddi
7a8609ac97 Add structural organization headers to 06_spatial module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before auto testing block
- Updated to ## 🎯 MODULE SUMMARY: Convolutional Networks

Improves notebook organization without changing any code logic or content.
2025-07-20 09:59:37 -04:00
Vijay Janapa Reddi
a435ca8ba5 Add structural organization headers to 05_dense module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before auto testing block
- Updated to ## 🎯 MODULE SUMMARY: Neural Network Architectures

Improves notebook organization without changing any code logic or content.
2025-07-20 09:58:34 -04:00
Vijay Janapa Reddi
b441541c28 Add structural organization headers to 04_layers module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: Neural Network Layers

Improves notebook organization without changing any code logic or content.
2025-07-20 09:56:48 -04:00
Vijay Janapa Reddi
5aa18b4c79 Add structural organization headers to 03_activations module
- Added ## 🔧 DEVELOPMENT section before Step 1 where development begins
- Added ## 🤖 AUTO TESTING section before auto testing block
- Updated to ## 🎯 MODULE SUMMARY: Activation Functions

Improves notebook organization without changing any code logic or content.
2025-07-20 09:55:47 -04:00
Vijay Janapa Reddi
a5293dc0bc 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
91d94f40c6 🔧 Fix DEVELOPMENT header placement in 01_setup module
- Moved ## 🔧 DEVELOPMENT to proper location at start of Step 2 where actual development begins
- Removed misplaced header from test function area
- Headers now correctly organize: Development → Auto Testing → Module Summary
2025-07-20 09:53:42 -04:00
Vijay Janapa Reddi
6fda7ea61c Add structural organization headers to 01_setup module
- Added ## 🔧 DEVELOPMENT section before test functions
- Added ## 🤖 AUTO TESTING section before nbgrader block
- Updated to ## 🎯 MODULE SUMMARY: Setup Configuration

Improves notebook organization without changing any code logic or content.
2025-07-20 09:52:32 -04:00
Vijay Janapa Reddi
0b94d1efb8 Fix 13_kernels: Move integration test BEFORE testing, clean structure
CORRECTED PATTERN NOW:
1.  Integration test (test_module_kernel_sequential_model) - BEFORE ## 🧪 Module Testing
2.  ## 🧪 Module Testing (markdown section)
3.  STANDARDIZED MODULE TESTING (nbgrader cell)
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 and markdown section
 Added integration test to the if __name__ == '__main__' block
 Clean STANDARDIZED MODULE TESTING structure

Module 13_kernels now follows the exact pattern
2025-07-20 09:45:38 -04:00
Vijay Janapa Reddi
2e2131540c Fix 12_compression: Move integration tests BEFORE testing, clean structure
CORRECTED PATTERN NOW:
1.  Integration tests (test_compression_integration, test_comprehensive_compression_integration) - BEFORE ## 🧪 Module Testing
2.  ## 🧪 Module Testing (markdown section)
3.  STANDARDIZED MODULE TESTING (nbgrader cell)
4.  if __name__ == '__main__' block with run_module_tests_auto
5.  ## 🎯 Module Summary (immediately after, no code between)

FIXES APPLIED:
 Moved both integration test functions from AFTER testing section to BEFORE it
 Removed duplicate integration test functions and markdown sections
 Cleaned up multiple run_module_tests_auto calls - now only one clean call
 Proper STANDARDIZED MODULE TESTING structure

Module 12_compression now follows the exact pattern
2025-07-20 09:42:47 -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
2fbd0d9915 Fix 08_dataloader: Move Module Summary AFTER STANDARDIZED MODULE TESTING
CORRECTED ORDER:
 BEFORE: Module Summary (line 1054) → 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 (1055) → ## 🎯 Module Summary (1115)
4.  No code between STANDARDIZED MODULE TESTING and Module Summary

Module 08_dataloader now follows the exact pattern the user requested
2025-07-20 09:29:36 -04:00
Vijay Janapa Reddi
ca6515efae 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
7808426ad7 Fix 01_setup: Correct pattern - Tests → STANDARDIZED MODULE TESTING → Module Summary
CORRECT PATTERN NOW:
1.  Unit tests (test_unit_personal_info_basic, test_unit_system_info_basic)
2.  ## 🧪 Module Testing
3.  STANDARDIZED MODULE TESTING cell
4.  run_module_tests_auto call
5.  ## 🎯 Module Summary (immediately after, no code between)

 Removed duplicate test functions that were incorrectly placed after run_module_tests_auto
 Clean separation: Tests → Testing → Summary
 No code between STANDARDIZED MODULE TESTING and Module Summary
2025-07-20 09:24:01 -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
a65db71762 Fix 08_dataloader: Move STANDARDIZED MODULE TESTING before Module Summary
CORRECTED ORDER:
 BEFORE: Module Summary (line 979) → STANDARDIZED MODULE TESTING (line 1137) 
 AFTER: STANDARDIZED MODULE TESTING → Module Summary 

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

Module 08_dataloader now has proper ordering
2025-07-20 09:16:12 -04:00
Vijay Janapa Reddi
0ebd3f5051 Fix 12_compression: Add missing Module Summary section
Module 12_compression now follows the complete standardized pattern:
1. ## 🧪 Module Testing (explanation)
2. Standardized testing cell with run_module_tests_auto
3. Integration test functions
4. ## 🎯 Module Summary (educational wrap-up) ← ADDED

 Added comprehensive Module Summary covering:
- Model compression techniques (pruning, quantization)
- Production deployment skills
- Mathematical foundations
- Real-world applications and industry connections
- Professional development outcomes

All 16 modules now follow the complete standardized testing pattern
2025-07-20 09:09:47 -04:00
Vijay Janapa Reddi
81984cfafd 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
688f508f39 🧹 Remove duplicate nbgrader cells from 01_setup
Cleaned up duplicate/redundant nbgrader cells that were just comments referencing test functions. The actual test functions remain in their proper location after the standardized testing section.

Removed:
- Duplicate test-personal-info nbgrader cell (just a comment)
- Duplicate test-system-info nbgrader cell (just a comment)
- Redundant 'Inline Test Functions' section

This eliminates confusion and follows the clean pattern established by other modules.
2025-07-20 09:05:38 -04:00