Commit Graph

79 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
2f23f757e7 MAJOR: Implement beautiful module progression through strategic reordering
This commit implements the pedagogically optimal "inevitable discovery" module progression based on expert validation and educational design principles.

## Module Reordering Summary

**Previous Order (Problems)**:
- 05_losses → 06_autograd → 07_dataloader → 08_optimizers → 09_spatial → 10_training
- Issues: Autograd before optimizers, DataLoader before training, scattered dependencies

**New Order (Beautiful Progression)**:
- 05_losses → 06_optimizers → 07_autograd → 08_training → 09_spatial → 10_dataloader
- Benefits: Each module creates inevitable need for the next

## Pedagogical Flow Achieved

**05_losses** → "Need systematic weight updates" → **06_optimizers**
**06_optimizers** → "Need automatic gradients" → **07_autograd**
**07_autograd** → "Need systematic training" → **08_training**
**08_training** → "MLPs hit limits on images" → **09_spatial**
**09_spatial** → "Training is too slow" → **10_dataloader**

## Technical Changes

### Module Directory Renaming
- `06_autograd` → `07_autograd`
- `07_dataloader` → `10_dataloader`
- `08_optimizers` → `06_optimizers`
- `10_training` → `08_training`
- `09_spatial` → `09_spatial` (no change)

### System Integration Updates
- **MODULE_TO_CHECKPOINT mapping**: Updated in tito/commands/export.py
- **Test directories**: Renamed module_XX directories to match new numbers
- **Documentation**: Updated all references in MD files and agent configurations
- **CLI integration**: Updated next-steps suggestions for proper flow

### Agent Configuration Updates
- **Quality Assurance**: Updated module audit status with new numbers
- **Module Developer**: Updated work tracking with new sequence
- **Documentation**: Updated MASTER_PLAN_OF_RECORD.md with beautiful progression

## Educational Benefits

1. **Inevitable Discovery**: Each module naturally leads to the next
2. **Cognitive Load**: Concepts introduced exactly when needed
3. **Motivation**: Students understand WHY each tool is necessary
4. **Synthesis**: Everything flows toward complete ML systems understanding
5. **Professional Alignment**: Matches real ML engineering workflows

## Quality Assurance

-  All CLI commands still function
-  Checkpoint system mappings updated
-  Documentation consistency maintained
-  Test directory structure aligned
-  Agent configurations synchronized

**Impact**: This reordering transforms TinyTorch from a collection of modules into a coherent educational journey where each step naturally motivates the next, creating optimal conditions for deep learning systems understanding.
2025-09-24 15:56:47 -04:00
Vijay Janapa Reddi
92781736a1 Restructure TinyTorch: Move TinyGPT to examples, improve testing framework
Major changes:
- Moved TinyGPT from Module 16 to examples/tinygpt (capstone demo)
- Fixed Module 10 (optimizers) and Module 11 (training) bugs
- All 16 modules now passing tests (100% health)
- Added comprehensive testing with 'tito test --comprehensive'
- Renamed example files for clarity (train_xor_network.py, etc.)
- Created working TinyGPT example structure
- Updated documentation to reflect 15 core modules + examples
- Added KISS principle and testing framework documentation
2025-09-22 09:37:18 -04:00
Vijay Janapa Reddi
174f58309b Update examples integration with module progression
- Update EXAMPLES mapping in tito to use new exciting names
- Add prominent examples section to main README
- Show clear progression: Module 05 → xornet, Module 11 → cifar10
- Update accuracy claims to realistic 57% (not aspirational 75%)
- Emphasize that examples are unlocked after module completion
- Connect examples to the learning journey

Students now understand when they can run exciting examples!
2025-09-21 15:58:02 -04:00
Vijay Janapa Reddi
85cf03be15 feat: Implement comprehensive student protection system for TinyTorch
🛡️ **CRITICAL FIXES & PROTECTION SYSTEM**

**Core Variable/Tensor Compatibility Fixes:**
- Fix bias shape corruption in Adam optimizer (CIFAR-10 blocker)
- Add Variable/Tensor compatibility to matmul, ReLU, Softmax, MSE Loss
- Enable proper autograd support with gradient functions
- Resolve broadcasting errors with variable batch sizes

**Student Protection System:**
- Industry-standard file protection (read-only core files)
- Enhanced auto-generated warnings with prominent ASCII-art headers
- Git integration (pre-commit hooks, .gitattributes)
- VSCode editor protection and warnings
- Runtime validation system with import hooks
- Automatic protection during module exports

**CLI Integration:**
- New `tito system protect` command group
- Protection status, validation, and health checks
- Automatic protection enabled during `tito module complete`
- Non-blocking validation with helpful error messages

**Development Workflow:**
- Updated CLAUDE.md with protection guidelines
- Comprehensive validation scripts and health checks
- Clean separation of source vs compiled file editing
- Professional development practices enforcement

**Impact:**
 CIFAR-10 training now works reliably with variable batch sizes
 Students protected from accidentally breaking core functionality
 Professional development workflow with industry-standard practices
 Comprehensive testing and validation infrastructure

This enables reliable ML systems training while protecting students
from common mistakes that break the Variable/Tensor compatibility.
2025-09-21 12:22:18 -04:00
Vijay Janapa Reddi
ab722bef02 Complete auto-generated warning system and establish core file protection
BREAKTHROUGH IMPLEMENTATION:
 Auto-generated warnings now added to ALL exported files automatically
 Clear source file paths shown in every tinytorch/ file header
 CLAUDE.md updated with crystal clear rules: tinytorch/ = edit modules/
 Export process now runs warnings BEFORE success message

SYSTEMATIC PREVENTION:
- Every exported file shows: AUTOGENERATED! DO NOT EDIT! File to edit: [source]
- THIS FILE IS AUTO-GENERATED FROM SOURCE MODULES - CHANGES WILL BE LOST!
- To modify this code, edit the source file listed above and run: tito module complete

WORKFLOW ENFORCEMENT:
- Golden rule established: If file path contains tinytorch/, DON'T EDIT IT DIRECTLY
- Automatic detection of 16 module mappings from tinytorch/ back to modules/source/
- Post-export processing ensures no exported file lacks protection warning

VALIDATION:
 Tested with multiple module exports - warnings added correctly
 All tinytorch/core/ files now protected with clear instructions
 Source file paths correctly mapped and displayed

This prevents ALL future source/compiled mismatch issues systematically.
2025-09-21 11:43:35 -04:00
Vijay Janapa Reddi
457947a2ac Implement auto-generated warnings in module export system
FEATURE ADDITION:
- Add automatic warnings to all exported core files
- Clear source file path shown in warning header
- Prevents accidental direct editing of generated files

TECHNICAL IMPLEMENTATION:
- _add_autogenerated_warnings() post-processes exported files
- _find_source_file_for_export() maps exports to source files
- Comprehensive mapping for all 16 modules
- Warning format: "# AUTOGENERATED! DO NOT EDIT! File to edit: [source]"

WORKFLOW COMPLIANCE:
- Addresses user request for systematic prevention of core file editing
- Enforces proper development workflow: Edit source → Export → Use
- Prevents source/compiled mismatch issues
- Educational: Shows developers exactly where to make changes

VALIDATION:
- Tested with tito module export 02_tensor
- Successfully added warnings to 3 files
- Preserves existing export functionality
- Maintains compatibility with existing systems
2025-09-21 11:39:50 -04:00
Vijay Janapa Reddi
86b908fe5c Add TinyTorch examples gallery and fix module integration issues
- Create professional examples directory showcasing TinyTorch as real ML framework
- Add examples: XOR, MNIST, CIFAR-10, text generation, autograd demo, optimizer comparison
- Fix import paths in exported modules (training.py, dense.py)
- Update training module with autograd integration for loss functions
- Add progressive integration tests for all 16 modules
- Document framework capabilities and usage patterns

This commit establishes the examples gallery that demonstrates TinyTorch
works like PyTorch/TensorFlow, validating the complete framework.
2025-09-21 10:00:11 -04:00
Vijay Janapa Reddi
9d295281b5 Refactor to 3 focused milestones with YAML configuration
MILESTONE SYSTEM REDESIGN:
- Reduced from 5 to 3 meaningful milestones based on student effort
- Better spacing: Module 6 → Module 11 → Module 16
- More exciting progression: Numbers → Objects → Code

NEW MILESTONE STRUCTURE:
1. 'Machines Can See' (Module 05): MLP achieves 85%+ MNIST accuracy
2. 'I Can Train Real AI' (Module 11): CNN achieves 65%+ CIFAR-10 accuracy
3. 'I Built GPT' (Module 16): Generate Python functions from natural language

CONFIGURATION SYSTEM:
- Created dedicated milestones/ directory
- Added milestones.yml for consistent configuration
- Added comprehensive README with implementation philosophy
- Updated milestone system to load from YAML config
- Proper module exercise tracking and requirements

IMPROVED USER EXPERIENCE:
- Fixed milestone count displays (0/3 instead of 0/5)
- Updated timeline views for 3 milestones
- Maintained all existing CLI functionality
- Better error handling and fallback configs

Each milestone now represents a major capability leap with proper
spacing that honors the substantial work students put into modules.
2025-09-20 22:19:48 -04:00
Vijay Janapa Reddi
9b21ce84a9 Enhance TinyTorch logo with flame-colored 'tiny' letters
- Change 'tiny' letters to bold orange1 for flame effect
- Simplify flame display to two bookend flames framing TORCH
- Improve color harmony between tiny letters and ASCII art
2025-09-20 21:16:07 -04:00
Vijay Janapa Reddi
08353f667f Implement Phase 1: Core milestone system architecture
- Add complete MilestoneSystem class with 5 epic milestones
- Integrate milestone detection into module completion workflow
- Implement milestone CLI commands (status, timeline, test, demo)
- Add milestone progress tracking and storage (.tito/milestones.json)
- Create epic celebration system for milestone unlocks
- Register milestone commands in main CLI

Features:
- 5 milestones: Basic Inference → Computer Vision → Full Training → Advanced Vision → Language Generation
- Visual progress tracking with Rich library
- Module completion triggers milestone evaluation
- Epic ASCII art celebrations for achievements
- Timeline views (tree and horizontal progress bar)
- Milestone testing and validation

The milestone system transforms module completion into meaningful
capability achievements that prepare students for ML engineering careers.
2025-09-20 20:42:07 -04:00
Vijay Janapa Reddi
0470838c31 Redesign TinyTorch CLI logo with vertical 'tiny' integration
- Create bold ASCII art logo with 'tiny' spelled vertically
- Add flame banner above TORCH for visual impact
- Update tagline to 'Don't import the future. Build it from tensors up.'
- Simplify logo command to show philosophy and meaning
- Remove unused preferences system
- Clean up display logic and improve color scheme

The new design features 'tiny' integrated vertically alongside TORCH,
creating a unique visual identity that reinforces the framework's philosophy
of building from small foundations up to powerful systems.
2025-09-20 19:39:30 -04:00
Vijay Janapa Reddi
3b721c5477 Add gamified capability showcase system with module completion integration
- Implement complete capability showcase system (11 demonstrations)
- Add auto-run showcases after successful module completion
- Create interactive launcher for easy showcase navigation
- Integrate with tito module complete workflow
- Add user preference system for logo themes
- Showcase student achievements without requiring additional work
- Demonstrate real ML capabilities from tensors to TinyGPT
- Use Rich terminal UI for beautiful visualizations
2025-09-19 18:17:02 -04:00
Vijay Janapa Reddi
cabcd01238 Fix Rich formatting display in TITO logo commands
- Fixed logo.py to use Rich Text objects instead of markup strings
- Fixed console.py print_ascii_logo to properly handle Rich markup
- Rich formatting codes like [dim] and [orange1] now display as actual formatting
- All logo variants (simple, full, animated, bright theme) now work correctly
- Text objects constructed manually to properly apply styling
- Verified with testing: markup no longer shows as literal text
2025-09-19 18:15:50 -04:00
Vijay Janapa Reddi
1611af0b78 Add progressive demo system with repository reorganization
Implements comprehensive demo system showing AI capabilities unlocked by each module export:
- 8 progressive demos from tensor math to language generation
- Complete tito demo CLI integration with capability matrix
- Real AI demonstrations including XOR solving, computer vision, attention mechanisms
- Educational explanations connecting implementations to production ML systems

Repository reorganization:
- demos/ directory with all demo files and comprehensive README
- docs/ organized by category (development, nbgrader, user guides)
- scripts/ for utility and testing scripts
- Clean root directory with only essential files

Students can now run 'tito demo' after each module export to see their framework's
growing intelligence through hands-on demonstrations.
2025-09-18 17:36:32 -04:00
Vijay Janapa Reddi
5482bb020e Enhance tito export system with virtual environment support and validation
Improvements:
- Use project virtual environment jupytext for consistent conversion
- Add comprehensive notebook integrity validation with cell counting
- Provide detailed export progress tracking and error reporting
- Include JSON structure validation for generated notebooks

These enhancements ensure reliable .py → .ipynb conversion workflow
and catch conversion issues early in the development process.
2025-09-18 16:42:05 -04:00
Vijay Janapa Reddi
e5635d075c Fix tito test framework to use return codes instead of output parsing
Root cause: Test framework was incorrectly parsing  symbols in educational
output as test failures, causing false negatives on working modules.

Changes:
- Focus on subprocess return codes (0 = success) as definitive test result
- Remove flawed output pattern matching that misinterpreted educational symbols
- Maintain proper error reporting for actual execution failures

Result: All 16 modules now correctly pass tests when they execute successfully,
eliminating false negative test failures.
2025-09-18 16:41:54 -04:00
Vijay Janapa Reddi
e053dc9a71 Improve Jupyter Book styling and configuration
- Replace ugly gray background with clean white theme
- Add proper logo styling and configuration
- Update book chapters from module READMEs
- Add educational-ml-docs-architect agent
- Clean up custom CSS for better readability
- Configure logo.png in correct location
- Update tito book command with proper chapters
2025-09-18 09:48:01 -04:00
Vijay Janapa Reddi
ae5a9260c4 Add tito grade command for simplified NBGrader interface
Implement comprehensive grading workflow wrapped behind tito CLI:
• tito grade setup - Initialize NBGrader course structure
• tito grade generate - Create instructor version with solutions
• tito grade release - Create student version without solutions
• tito grade collect - Collect student submissions
• tito grade autograde - Automatically grade submissions
• tito grade manual - Open manual grading interface
• tito grade feedback - Generate student feedback
• tito grade export - Export grades to CSV

This allows users to only learn tito commands without needing to
understand NBGrader's complex interface. All grading functionality
is accessible through simple, consistent tito commands.
2025-09-17 19:22:02 -04:00
Vijay Janapa Reddi
4de61031d1 Implement interactive ML Systems questions and standardize module structure
Major Educational Framework Enhancements:
• Deploy interactive NBGrader text response questions across ALL modules
• Replace passive question lists with active 150-300 word student responses
• Enable comprehensive ML Systems learning assessment and grading

TinyGPT Integration (Module 16):
• Complete TinyGPT implementation showing 70% component reuse from TinyTorch
• Demonstrates vision-to-language framework generalization principles
• Full transformer architecture with attention, tokenization, and generation
• Shakespeare demo showing autoregressive text generation capabilities

Module Structure Standardization:
• Fix section ordering across all modules: Tests → Questions → Summary
• Ensure Module Summary is always the final section for consistency
• Standardize comprehensive testing patterns before educational content

Interactive Question Implementation:
• 3 focused questions per module replacing 10-15 passive questions
• NBGrader integration with manual grading workflow for text responses
• Questions target ML Systems thinking: scaling, deployment, optimization
• Cumulative knowledge building across the 16-module progression

Technical Infrastructure:
• TPM agent for coordinated multi-agent development workflows
• Enhanced documentation with pedagogical design principles
• Updated book structure to include TinyGPT as capstone demonstration
• Comprehensive QA validation of all module structures

Framework Design Insights:
• Mathematical unity: Dense layers power both vision and language models
• Attention as key innovation for sequential relationship modeling
• Production-ready patterns: training loops, optimization, evaluation
• System-level thinking: memory, performance, scaling considerations

Educational Impact:
• Transform passive learning to active engagement through written responses
• Enable instructors to assess deep ML Systems understanding
• Provide clear progression from foundations to complete language models
• Demonstrate real-world framework design principles and trade-offs
2025-09-17 14:42:24 -04:00
Vijay Janapa Reddi
95b7edee02 Implement Package Manager integration testing system
Features:
- Module-level integration tests for immediate validation
- Two-tier validation: integration tests + checkpoint tests
- Quick package validation after every module completion
- Comprehensive integration test suite for all modules
- Package Manager coordination and test running

Two-Tier System:
1. Integration Test (Package Manager) - "Module works in package"
   - Quick validation (< 1 second)
   - Import validation and basic functionality
   - No conflicts with other modules

2. Checkpoint Test (existing) - "Complete capability unlocked"
   - Comprehensive validation (2-10 seconds)
   - End-to-end workflows and multi-module capabilities
   - Major milestone achievements

CLI Workflow:
- tito module complete 02_tensor
- → Export + Integration test + Checkpoint test
- → Two-tier results with different messaging
- → Immediate feedback + capability celebrations

Integration:
- 15 module integration tests covering complete course
- Package health validation and dependency checking
- Clean separation from checkpoint capability testing
- Professional Package Manager workflow
2025-09-16 21:32:08 -04:00
Vijay Janapa Reddi
06db3f905a Add automatic post-module integration testing workflow
Features:
- New `tito module complete <module>` command for full workflow
- Enhanced `tito export --test-checkpoint` for optional testing
- Automatic checkpoint tests after successful module exports
- Module-to-checkpoint mapping for 16 checkpoints
- Progress celebration and next step guidance
- Clear error handling and recovery guidance

Workflow:
- Student completes module → runs tito module complete
- System exports module → runs integration test → shows progress
- Immediate feedback on capability advancement
- Smart suggestions for next learning steps

Integration:
- Maps each module to corresponding checkpoint capability
- Provides Rich CLI celebration when checkpoints achieved
- Seamless integration with existing checkpoint system
- Maintains backward compatibility with existing commands
2025-09-16 21:15:03 -04:00
Vijay Janapa Reddi
824b489062 Implement comprehensive checkpoint system with CLI integration
Features:
- 16 checkpoint test suite validating ML systems capabilities
- Integration tests covering complete learning progression
- Rich CLI progress tracking with visual timelines
- Capability-driven assessment from environment to production

Checkpoints:
- Environment setup through full ML system deployment
- Each checkpoint validates integrated functionality
- Progressive capability building with clear success criteria
- Professional CLI interface with status/timeline/test commands
2025-09-16 21:02:11 -04:00
Vijay Janapa Reddi
df67eb4a0a Rename milestone to checkpoint system with enhanced Rich CLI visualizations
Major changes:
- Renamed entire system from "milestone" to "checkpoint" for academic framing
- Checkpoints are now positioned as academic progress markers in learning journey
- Implemented enhanced Rich CLI timeline with progress bars and connecting lines
- Added overall progress tracking (16/16 modules = 100%)

Enhanced timeline visualization:
- Horizontal view shows progress bar with filled/unfilled segments
- Visual connecting lines between checkpoints showing completion status
- Color-coded progress: green (complete), yellow (in-progress), dim (future)
- Percentage indicators for each checkpoint and overall progress

CLI improvements:
- `tito checkpoint status` - Shows overall and per-checkpoint progress
- `tito checkpoint timeline --horizontal` - Rich visual progress line
- `tito checkpoint timeline` - Vertical tree view with module details
- Better progress indicators with filled bars and connecting lines

Documentation updates:
- Renamed milestone-system.md to checkpoint-system.md
- Updated all references from milestone to checkpoint terminology
- Emphasized academic checkpoint philosophy and progress markers
- Added descriptions of new Rich CLI visualizations

Benefits:
- More academic framing aligns with educational context
- Visual progress bars provide immediate feedback on learning journey
- Checkpoint terminology is more familiar to students
- Rich CLI visualizations make progress tracking engaging
2025-09-16 13:27:43 -04:00
Vijay Janapa Reddi
2d918fadbf Implement comprehensive milestone system for capability-driven learning
Features implemented:
- Complete milestone tracking system with Foundation → Architecture → Training → Inference → Serving progression
- Rich CLI visualization with status, timeline (horizontal/vertical), and progress tracking
- Ticker-based granular progress within each milestone showing module completion
- Comprehensive documentation explaining the pedagogical approach and system benefits
- Integration with existing tito CLI infrastructure and module detection

Key capabilities:
- `tito milestone status` - shows current progress and capabilities unlocked
- `tito milestone timeline` - visual progress timeline with multiple views
- `tito milestone test/unlock` - placeholder for future capability testing
- Automatic module detection and progress calculation
- Clear capability statements for each milestone achievement

Benefits:
- Transforms learning from "completing modules" to "building capabilities"
- Provides clear motivation through visual progress and capability unlocks
- Aligns with real ML engineering workflow: Foundation → Architecture → Training → Inference → Serving
- Gives students concrete sense of progress toward complete ML framework
2025-09-16 13:15:13 -04:00
Vijay Janapa Reddi
eea368db0d Integrate NBGrader with TinyTorch and enhance status checking
- Fix NBGrader configuration to use proper assignments/ directory structure
- Update NBGrader commands to work with TinyTorch modules in modules/source/
- Initialize complete NBGrader workflow: generate -> release -> collect -> autograde
- Add virtual environment setup with all required dependencies (numpy, matplotlib, pytest, nbgrader, rich, networkx)
- Integrate comprehensive status checking into tito CLI hierarchy (tito/core/status_analyzer.py)
- Remove standalone status scripts - everything now unified under tito commands
- Provide end-to-end tested workflow for educational assignment management

Tested functionality:
- tito module status --comprehensive (full system health dashboard)
- tito nbgrader init/generate/release/status (complete assignment workflow)
- Virtual environment with proper dependency management
- Professional CLI architecture with no standalone scripts
2025-09-16 02:30:49 -04:00
Vijay Janapa Reddi
82ed02eec3 Integrate comprehensive status checker into tito CLI architecture
- Extract status analysis logic from standalone script into tito/core/status_analyzer.py
- Refactor tito/commands/status.py to support both basic and comprehensive modes
- Add --comprehensive flag for full system health dashboard
- Comprehensive analysis includes environment health, module compliance, and actionable insights
- Remove standalone tinytorch_status_checker.py script

Users can now run 'tito module status --comprehensive' for complete system analysis.
2025-09-16 02:12:32 -04:00
Vijay Janapa Reddi
0bdd1e612a Complete fix for tito module view command
- Added modules_dir to CLIConfig (alias for assignments_dir)
- Made environment validation warning-only to allow development
- Command now works: generates notebooks and launches Jupyter Lab
- Tested successfully with 'tito module view 02_tensor'

The view command is fully functional for interactive development.
2025-09-15 19:08:10 -04:00
Vijay Janapa Reddi
4ec286c874 Fix tito module view command registration
- Added ViewCommand import to module.py
- Registered view as a valid subcommand
- Added view command to subparser and execution flow
- Updated help text with view command examples

The command now properly appears in 'tito module --help' and can be executed.
2025-09-15 19:06:01 -04:00
Vijay Janapa Reddi
25f71041d4 Update Module Developer agent and add Module 02 restructure
- Enhanced Module Developer agent with balance philosophy
  - Preserve educational content while adding structure
  - Keep Build→Use→Understand flow
  - Maintain verbose but valuable explanations

- Created restructured Module 02 (Tensor)
  - Added 5 C's framework as enhancement not replacement
  - Preserved ALL educational content
  - Separated implementation from testing
  - Added comparison report showing 100% content preservation

- Added TITO CLI Developer agent for CLI enhancements
- Added CLAUDE.md with git best practices
- Added tito module view command (in progress)
- Generated setup_dev notebook
2025-09-15 19:03:09 -04:00
Vijay Janapa Reddi
77a9480614 Implement logical test sequencing - unit tests run first, then integration tests 2025-07-20 13:02:21 -04:00
Vijay Janapa Reddi
a7692e6c91 🧹 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
67c58baab1 fix: Python 3.8 compatibility for CLI
- Replace str | None with Optional[str] in export.py
- Replace list[str] with List[str] in config.py
- Add missing typing imports for compatibility
- Ensures CLI works on Python 3.8 systems
2025-07-18 00:40:04 -04:00
Vijay Janapa Reddi
e283e95056 Implement README-to-chapter conversion for cleaner website workflow 2025-07-16 00:56:36 -04:00
Vijay Janapa Reddi
501d01e1df Update book/_toc.yml and tito/commands/book.py with latest fixes and notebook generation logic 2025-07-16 00:44:22 -04:00
Vijay Janapa Reddi
246a7a1f21 Auto-generate notebooks during book build process 2025-07-15 23:53:26 -04:00
Vijay Janapa Reddi
5fba0ccdea Revert "Fix tito CLI: skip virtual environment validation in CI environments"
This reverts commit de505f5fd0747273be343e878da6cd57a2a6b5a7.
2025-07-15 23:33:04 -04:00
Vijay Janapa Reddi
cbd37d83d5 Fix tito CLI: skip virtual environment validation in CI environments 2025-07-15 23:32:33 -04:00
Vijay Janapa Reddi
e4d4db5d42 Fix GitHub workflow to properly activate virtual environment
- Combine venv setup and tito execution in same step
- Add pytest installation for tito environment validation
- Add explanatory comments about GitHub Actions shell behavior
- Remove environment skipping hack in favor of proper setup
- Workflow now uses tito CLI consistently for book generation
2025-07-15 23:26:34 -04:00
Vijay Janapa Reddi
25497661fc Update module numbering from 00-13 to 01-14 and refresh tagline
- Updated all module references to start from 01 instead of 00
- Changed tagline to 'Build your own ML framework. Start small. Go deep.'
- Added educational foundation section linking to ML Systems book
- Updated README, documentation, CLI examples, and prerequisites
- Regenerated book content with consistent numbering throughout
- Maintains 14 modules total but with natural numbering (01-14)
2025-07-15 21:11:07 -04:00
Vijay Janapa Reddi
827aaabff6 🧪 Test publish command 2025-07-15 20:39:51 -04:00
Vijay Janapa Reddi
100f0cc3fa Remove testing.py backup file - cleanup complete 2025-07-14 10:24:30 -04:00
Vijay Janapa Reddi
d14f92a9b2 Simplify test discovery and clean up test function names across all modules
MAJOR IMPROVEMENT: Simplified test discovery logic
- Removed restrictive valid_patterns requirement from testing framework
- Any function starting with 'test_' is now automatically discovered
- Follows standard pytest conventions - no maintenance overhead
- Eliminates need to manually add patterns for new test functions

CLEANED UP: Test function names across all 10 modules
- Removed redundant '_comprehensive' suffix from all test functions
- Updated 40+ test function names to be more concise and readable:
  * 00_setup: 6 functions (test_personal_info, test_system_info, etc.)
  * 01_tensor: 4 functions (test_tensor_creation, test_tensor_properties, etc.)
  * 02_activations: 1 function (test_activations)
  * 03_layers: 3 functions (test_matrix_multiplication, test_dense_layer, etc.)
  * 04_networks: 4 functions (test_sequential_networks, test_mlp_creation, etc.)
  * 05_cnn: 3 functions (test_convolution_operation, test_conv2d_layer, etc.)
  * 06_dataloader: 4 functions (test_dataset_interface, test_dataloader, etc.)
  * 07_autograd: 6 functions (test_variable_class, test_add_operation, etc.)
  * 08_optimizers: 5 functions (test_gradient_descent_step, test_sgd_optimizer, etc.)
  * 09_training: 6 functions (test_mse_loss, test_crossentropy_loss, etc.)
  * 10_compression: 6 functions (already cleaned up)

VERIFICATION: All tests still pass
- All 10 modules tested successfully with new discovery logic
- Total test count maintained: 47 inline tests across all modules
- No functionality lost, only improved maintainability

RESULT: Much cleaner, more maintainable testing framework following standard conventions
2025-07-14 10:24:04 -04:00
Vijay Janapa Reddi
30026b1713 Clean up compression test function names
- Removed redundant '_comprehensive' suffix from test function names:
  * test_compression_metrics_comprehensive → test_compression_metrics
  * test_magnitude_pruning_comprehensive → test_magnitude_pruning
  * test_quantization_comprehensive → test_quantization
  * test_distillation_comprehensive → test_distillation
  * test_structured_pruning_comprehensive → test_structured_pruning
- Updated testing framework to recognize new compression test patterns
- All tests still pass (6/6 inline + 8/8 integration = 14/14 total)
- Other modules unaffected (tensor 4/4, activations 5/5 still pass)
- Cleaner, more concise test function names
2025-07-14 09:53:37 -04:00
Vijay Janapa Reddi
62d4820900 Add sync/export reminder to test command
- Add prominent yellow reminder box before all test executions
- Shows clear instructions for 'tito export' and 'tito nbdev build'
- Ensures users sync modules to package before testing
- Displays in both single module tests and all tests
- Prevents testing stale code by reminding users to export latest changes

This ensures users always test the most current code from their development modules.
2025-07-13 22:46:09 -04:00
Vijay Janapa Reddi
5a1e816673 Add debugging hint box for failed external tests
- Add yellow hint box that appears when external tests fail
- Shows specific pytest commands for debugging failing tests
- Includes general debugging commands (verbose, print statements)
- Provides specific test commands with proper pytest formatting
- Includes pro tips for advanced debugging (--pdb, -k patterns, --tb options)
- Enhances student debugging experience with actionable guidance
2025-07-13 22:26:58 -04:00
Vijay Janapa Reddi
601c4b6b21 feat: enhance testing infrastructure with detailed progress and function-level reporting
🎯 Key Improvements:
- Fix test parsing to show individual inline test results (was showing 1/1, now shows actual count like 4/4)
- Display actual function names (test_tensor_arithmetic_comprehensive) for precise debugging
- Add real-time progress indicators showing compilation → inline tests → external tests
- Show module-by-module progress with completion feedback

🚀 Enhanced User Experience:
- Clear progress tracking: 'Starting 01_tensor...' → 'Completed 01_tensor testing (4/4)'
- Function-level test names for immediate debugging capability
- No more silent waiting - real-time feedback on what's happening
- Better success rates with --inline-only flag (90.2% vs 87.4%)

🔧 Technical Changes:
- Fixed parsing logic in _run_inline_tests() to handle start/end markers correctly
- Enhanced test result display to include function names alongside status
- Added granular progress messages in _test_module() method
- Improved overall test reporting across all 9 modules

📊 Impact:
- 37/41 inline tests now properly reported vs generic 'module_tests'
- Clear identification of failing functions for targeted fixes
- Professional, actionable test output for development workflow
2025-07-13 21:53:59 -04:00
Vijay Janapa Reddi
5264b6aa68 Move testing utilities to tito/tools for better software architecture
- Move testing utilities from tinytorch/utils/testing.py to tito/tools/testing.py
- Update all module imports to use tito.tools.testing
- Remove testing utilities from core TinyTorch package
- Testing utilities are development tools, not part of the ML library
- Maintains clean separation between library code and development toolchain
- All tests continue to work correctly with improved architecture
2025-07-13 21:05:11 -04:00
Vijay Janapa Reddi
2a2b5dad1e 🔬 Complete inline test verification and standardization
 All 8 modules now have fully functional inline tests
🎯 Verified 37 inline tests across all implemented modules
📈 08_optimizers module fully standardized with TinyTorch naming conventions
🔧 Fixed import path issues in 08_optimizers module
🧪 All inline tests provide excellent educational feedback

Modules verified:
- 00_setup: 8 tests 
- 01_tensor: 4 tests 
- 02_activations: 5 tests 
- 03_layers: 3 tests 
- 04_networks: 4 tests 
- 05_cnn: 4 tests 
- 06_dataloader: 4 tests 
- 07_autograd: 6 tests 
- 08_optimizers: 5 tests 

All inline tests pass with comprehensive educational output.
2025-07-13 20:17:48 -04:00
Vijay Janapa Reddi
d3dfec7bea Implement comprehensive testing strategy with inline and external test support
 Features:
- Enhanced tito test command with inline and external test detection
- Multiple report formats: summary, detailed, and default
- Comprehensive test result tracking and reporting
- Support for both individual module testing and all-module testing
- Test function detection and execution within _dev.py files
- External pytest integration with proper result parsing

📊 Results:
- 9 modules tested: 3 fully passing, 6 with various issues
- 141/185 tests passing (76.2% success rate)
- Clear separation of inline vs external test results
- Detailed error reporting for failed tests and compilation issues
2025-07-13 18:17:52 -04:00
Vijay Janapa Reddi
469af4c3de Remove module-level tests directories, keep only main tests/ for exported package validation
- Remove all tests/ directories under modules/source/
- Keep main tests/ directory for testing exported functionality
- Update status command to check tests in main tests/ directory
- Update documentation to reflect new test structure
- Reduce maintenance burden by eliminating duplicate test systems
- Focus on inline NBGrader tests for development, main tests for package validation
2025-07-13 17:14:14 -04:00