mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-03-12 03:03:37 -05:00
🎯 NORTH STAR VISION DOCUMENTED: 'Don't Just Import It, Build It' - Training AI Engineers, not just ML users AI Engineering emerges as a foundational discipline like Computer Engineering, bridging algorithms and systems to build the AI infrastructure of the future. 🧪 ROBUST TESTING FRAMEWORK ESTABLISHED: - Created tests/regression/ for sandbox integrity tests - Implemented test-driven bug prevention workflow - Clear separation: student tests (pedagogical) vs system tests (robustness) - Every bug becomes a test to prevent recurrence ✅ KEY IMPLEMENTATIONS: - NORTH_STAR.md: Vision for AI Engineering discipline - Testing best practices: Focus on robust student sandbox - Git workflow standards: Professional development practices - Regression test suite: Prevent infrastructure issues - Conv->Linear dimension tests (found CNN bug) - Transformer reshaping tests (found GPT bug) 🏗️ SANDBOX INTEGRITY: Students need a solid, predictable environment where they focus on ML concepts, not debugging framework issues. The framework must be invisible. 📚 EDUCATIONAL PHILOSOPHY: TinyTorch isn't just teaching a framework - it's founding the AI Engineering discipline by training engineers who understand how to BUILD ML systems. This establishes the foundation for training the first generation of true AI Engineers who will define this emerging discipline.
🧪 TinyTorch Integration Tests
⚠️ CRITICAL DIRECTORY - DO NOT DELETE
This directory contains 17 integration test files that verify cross-module functionality across the entire TinyTorch system. These tests represent significant development effort and are essential for:
- Module integration validation
- Cross-component compatibility
- Real-world ML pipeline testing
- System-level regression detection
📁 Test Structure
test_*_integration.py- Cross-module integration teststest_utils.py- Shared testing utilitiestest_integration_report.md- Test documentation
🧪 Integration Test Coverage
Foundation Integration
test_tensor_activations_integration.py- Tensor + Activationstest_layers_networks_integration.py- Layers + Dense Networkstest_tensor_autograd_integration.py- Tensor + Autograd
Architecture Integration
test_tensor_attention_integration.py- NEW: Tensor + Attention mechanismstest_attention_pipeline_integration.py- NEW: Complete transformer-like pipelinestest_tensor_cnn_integration.py- Tensor + Spatial/CNNtest_cnn_networks_integration.py- Spatial + Dense Networkstest_cnn_pipeline_integration.py- Complete CNN pipelines
Training & Data Integration
test_dataloader_tensor_integration.py- DataLoader + Tensortest_training_integration.py- Complete training workflowstest_ml_pipeline_integration.py- End-to-end ML pipelines
Inference Serving Integration
test_compression_integration.py- Model compressiontest_kernels_integration.py- Custom operationstest_benchmarking_integration.py- Performance measurementtest_mlops_integration.py- Deployment and serving
🔧 Usage
# Run all integration tests
pytest tests/ -v
# Run specific module integration
pytest tests/test_tensor_attention_integration.py -v
pytest tests/test_attention_pipeline_integration.py -v
# Run attention-related tests
pytest tests/ -k "attention" -v
🚨 Recovery Instructions
If accidentally deleted:
git checkout HEAD -- tests/
git status # Verify recovery
📊 Test Coverage
These integration tests complement the inline tests in each module's *_dev.py files, providing comprehensive system validation with focus on:
- Real component integration (not mocks)
- Cross-module compatibility
- Realistic ML workflows (classification, seq2seq, transformers)
- Performance and scalability