2580 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
a5d9ed3984 Remove doctor.py and update remaining system doctor references
- Delete tito/commands/doctor.py (replaced by health/check commands)
- Update export.py: system doctor → system health
- Update help.py: system doctor → system health (4 occurrences)
- Update module_workflow.py: system doctor → system health
- Update setup.py: system doctor → system health
- Update src.py: system doctor → system health

Completes migration from 'tito system doctor' to new command structure.
2025-11-27 13:35:33 +01:00
Vijay Janapa Reddi
23e07d62a1 Update TITO documentation for new system commands
- Replace 'tito system doctor' with 'tito system health'
- Add all 8 system commands to overview.md command reference
- Update purpose descriptions for system commands
- Clarify command hierarchy (health/check/info/version)

Files updated:
- site/tito/overview.md: Complete system commands table
- site/tito/modules.md: Environment health section
- site/tito/troubleshooting.md: Diagnostic workflow
- site/tito/data.md: Health check references
- site/faq.md: Setup verification
- site/getting-started.md: First-time setup
- site/usage-paths/team-onboarding.md: Team onboarding
2025-11-27 13:32:12 +01:00
Vijay Janapa Reddi
9b09888749 Clean up CLI debug output
- Add suppress_output() helper in base.py (for reference)
- Comment out debug print in virtual_env_manager.py
- Remove noisy 'running this from' messages
2025-11-26 18:11:06 +01:00
Vijay Janapa Reddi
c10b3b9f12 Add quiet parameter to enable_autograd() for CLI tools
- Add quiet=False parameter to enable_autograd()
- Suppress print statements when quiet=True
- Check TINYTORCH_QUIET env var on module import
- Allows CLI tools to import tinytorch silently
- Students still see helpful messages in notebooks
2025-11-26 18:11:00 +01:00
Vijay Janapa Reddi
763ea7e462 Wire up new system commands and set TINYTORCH_QUIET
- Register new commands in __init__.py
- Add subparsers in system.py
- Set TINYTORCH_QUIET=1 in main.py to suppress autograd messages
2025-11-26 18:10:53 +01:00
Vijay Janapa Reddi
f913b54356 Add new system commands: check, version, clean, report
- check: Comprehensive environment validation (60+ tests)
- version: Definitive version catalog for all dependencies
- clean: Workspace cleanup (caches, temp files, build artifacts)
- report: Generate diagnostic JSON for bug reports and support
2025-11-26 18:10:47 +01:00
Vijay Janapa Reddi
62511ae91d Deduplicate system commands: remove version info redundancy
- health: Show only / status (no version numbers)
- info: Remove dependency table (use 'system version' instead)
- Clear separation: health=status, info=resources, version=versions
2025-11-26 18:10:39 +01:00
Vijay Janapa Reddi
356ef2b1a1 Add personal professor message and TinyML origin story to logo command
Enhanced the tito logo command with a personal message from Professor Vijay
Janapa Reddi explaining how TinyTorch grew from the TinyML movement at Harvard.
The message emphasizes the importance of engineering ML systems from first
principles and includes the memorable Lego/Star Wars analogy.

Key changes:
- Added personal signature with Harvard CS 249R affiliation
- Included TinyML movement origin story in conversational, italic style
- Emphasized "engineer" as the core philosophy
- Added Lego blocks analogy for building from scratch
- Updated catchphrase: "The future of ML is tiny and bright—don't just 'import torch', build it."
- Updated tagline: "Start tiny. Go deep. Build big."

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 16:43:12 +01:00
Vijay Janapa Reddi
89a9d29d96 Restructure website navigation for release
## Navigation Improvements
- Consolidated Getting Started: 6 separate pages → 1 comprehensive guide
- Implemented collapsible sidebar sections for all tiers
- Removed redundant role-based pages (student/instructor/TA separation)
- Professional, release-ready navigation structure

## New Files
- site/getting-started.md - Comprehensive guide covering all roles

## Updated Files
- site/_toc.yml - Restructured with collapsible sections
- site/_config.yml - Added sidebar collapse configuration
- site/intro.md - Fixed landing page links
- site/chapters/00-introduction.md - Updated cross-references
- site/community.md - Updated educator resources links

## Benefits
- Reduced cognitive load (cleaner sidebar)
- Eliminated duplication
- Better organization with collapsible tiers
- Single source of truth for getting started

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 13:16:53 -05:00
Vijay Janapa Reddi
8f99175f2c Fix CLI bugs and rename milestone → milestones
## Bug Fixes
- Fixed Bug #1: Reset command directory path (modules/ → src/)
- Fixed Bug #2: Reset command file naming (short name → full module name)
- Fixed Transformer milestone prerequisites (skip CNN/spatial modules)

## Command Changes
- Renamed `milestone` → `milestones` (plural)
- Removed old `milestone` backward compatibility alias
- Updated all milestone references to use "MLPerf benchmarks"

## Testing
- Completed 8/8 Priority 1 & 2 CLI tests
- Documented 3 bugs (1 fixed, 2 open)
- Added comprehensive test documentation

## Visual Improvements
- Fixed "Tiny" capitalization in banner
- Enhanced prerequisite checking with locked module display
- Improved completion workflow with 3-step visual feedback

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 13:07:30 -05:00
Vijay Janapa Reddi
b613bc8452 Fix brand capitalization: tiny → Tiny
Changed banner to display 'Tiny🔥TORCH' with capital T to match
the official brand style.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 12:00:17 -05:00
Vijay Janapa Reddi
785e7c1582 Enhance CLI visual design for better student engagement
Improved three key student-facing commands with Rich formatting:

1. tito module status
   - Visual progress bar (███░░░)
   - Clean table with status icons (🚀🔒)
   - Smart list collapsing for readability
   - Milestone readiness indicators
   - Clear "Next Action" guidance

2. tito module complete
   - 3-step visual workflow (Test → Export → Track)
   - Celebratory completion message
   - Shows what students can now do
   - Progress percentage tracking
   - Suggests next module

3. tito module start
   - Prerequisite checking (enforces sequential learning)
   - Beautiful locked/unlocked module displays
   - Shows missing prerequisites in table
   - Milestone progress preview
   - Clear step-by-step instructions

Design principles:
- Progressive disclosure (show relevant info only)
- Clear visual hierarchy (panels, tables, separators)
- Pedagogical guidance (always show next action)
- Consistent iconography (🚀🔒🏆💡)

Ready for demo GIF recording!

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 11:53:29 -05:00
Vijay Janapa Reddi
579c8e170e Merge restructure/src-modules-separation into dev
This merge brings in the complete src-modules directory separation restructuring.

## Key Changes

### Directory Structure
- **scripts/**: New home for build and utility scripts (moved from bin/)
  - activate-tinytorch: Environment activation
  - generate_module_metadata.py: Module metadata generation
  - generate_student_notebooks.py: Student notebook generation
  - tito: TinyTorch CLI tool

- **src/**: Developer source (graded notebooks with solutions)
- **modules/**: Student workspace (generated from src/)
- **docs/history/**: Historical documentation and migration notes

### Build System
- site/build.sh: Automated Jupyter Book 1.x build script
- Jupyter Book 1.x (Sphinx) confirmed as stable platform
- Jupyter Book 2.0 migration documented and archived

### Infrastructure
- All symlinks updated: modules/ → src/
- .envrc updated for new scripts/ location
- pyproject.toml updated for src/ as primary source
- Documentation templates updated

## Workflow Enabled

Developers work in src/, students receive modules/, both coexist cleanly.

See commits:
- 14251f06: Complete src-modules separation symlinks and infrastructure
- eed32f4e: Reorganize repository structure and add build tooling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 11:30:38 -05:00
Vijay Janapa Reddi
3e36b520b3 Complete src-modules separation: Update all symlinks and infrastructure
## Symlink Updates (modules/ → src/)
- Update all 20 site/modules/*_ABOUT.md symlinks to point to src/
- Update all 20 src/*/ABOUT.md internal references

## Infrastructure Changes
- Remove bin/ directory scripts (moved to scripts/ in previous commit)
- Update .envrc: Reference new scripts/ directory structure
- Update pyproject.toml: Reflect src/ as primary source location
- Update docs/development/MODULE_ABOUT_TEMPLATE.md: src/ paths
- Update site/requirements.txt: Documentation dependencies

## Restructuring Complete

The repository now has clean separation:
- `src/`: Developer source code (graded notebooks with solutions)
- `modules/`: Student workspace (generated from src/)
- `scripts/`: Build and utility scripts
- `site/`: Documentation and Jupyter Book website

This enables the intended workflow:
1. Developers work in src/
2. Students receive generated notebooks in modules/
3. Both can coexist without conflicts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 11:30:06 -05:00
Vijay Janapa Reddi
7826e167b6 Reorganize repository structure and add build tooling
## Repository Organization
- Move scripts from bin/ to scripts/ directory
  - activate-tinytorch: Environment activation script
  - generate_module_metadata.py: Module metadata generator
  - generate_student_notebooks.py: Student notebook generator
  - tito: TinyTorch CLI tool

## Build System
- Add site/build.sh: Jupyter Book 1.x build automation script
  - Auto-detects project root or site directory
  - Activates virtual environment if available
  - Handles clean builds with proper error handling

## Documentation
- Add docs/history/ for migration documentation
  - ROLLBACK_TO_JB1.md: Jupyter Book 1.x rollback documentation
  - MIGRATION_TO_V2.md: Jupyter Book 2.0 migration attempt notes

## Infrastructure Updates
- Update all site/modules/*_ABOUT.md symlinks: modules/ → src/
- Update all src/*/ABOUT.md symlinks: modules/ → src/
- Update .envrc: Reflect new scripts/ directory structure
- Update pyproject.toml: Add build system dependencies

This commit completes the src-modules separation restructuring and
adds necessary tooling for the new repository layout.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 11:29:41 -05:00
Vijay Janapa Reddi
52e1cf6f69 Add role-based command reference to CLI overview
Added comprehensive role-based documentation:
- 👥 Three user personas: Student, Instructor, Developer
- Visual 3-column layout with workflows for each role
- New Developer Commands section with tito src commands
- Separate workflow sections for Students vs Developers
- Clear directory structure explanation

Benefits:
- Users immediately see relevant commands for their role
- Reduces confusion about src/ vs modules/
- Makes tito src commands discoverable
- Professional UX with visual separation
2025-11-25 02:35:50 -05:00
Vijay Janapa Reddi
95f3615dbc Update COMMAND_HIERARCHY: tito source → tito src 2025-11-25 02:30:22 -05:00
Vijay Janapa Reddi
4b230eec34 Rename command: tito source → tito src for directory alignment
Changed 'source' to 'src' to match src/ directory name:
- Renamed SourceCommand → SrcCommand
- Updated command from 'tito source' → 'tito src'
- Updated all imports and references
- Updated documentation (README, COMMAND_HIERARCHY)

Benefits:
- Perfect alignment with src/ directory
- Follows standard convention (src/ is ubiquitous)
- Shorter, clearer commands
- Obvious context: 'tito src export' = export from src/

Tested: tito src export 01_tensor works correctly
2025-11-25 02:29:14 -05:00
Vijay Janapa Reddi
6a813126f6 Final test results update: all critical issues fixed 2025-11-25 02:13:52 -05:00
Vijay Janapa Reddi
ae1703ad6c Update documentation for new src/ structure
Updated all documentation to reflect new directory structure:
- Source code: src/XX_name/XX_name.py (developers)
- Generated notebooks: modules/XX_name/XX_name.ipynb (students)
- Package code: tinytorch/ (auto-generated)

Files updated:
- site/tito/modules.md: Updated paths and workflow
- site/tito/troubleshooting.md: Updated file paths
- site/tito/data.md: Clarified data locations
- site/student-workflow.md: Updated workflow diagram
- site/quickstart-guide.md: Updated quickstart paths
- docs/STUDENT_QUICKSTART.md: Updated notebook paths
- docs/development/module-rules.md: Complete structure overhaul

All documentation now accurately reflects developer vs student workflows
2025-11-25 02:13:19 -05:00
Vijay Janapa Reddi
7ff898f136 Update test results: mark critical bugs as fixed 2025-11-25 02:02:32 -05:00
Vijay Janapa Reddi
0e16e17e32 Fix critical bugs in module complete and milestone run
Fixes:
- module complete: Update paths to use src/ for source files
- module complete: Fix export call to use new SourceCommand API
- milestone run: Remove nonexistent progress_tracker dependency
- milestone run: Use progress.json directly for prerequisite checking

Both commands now work correctly with new directory structure
2025-11-25 02:01:52 -05:00
Vijay Janapa Reddi
45c70cc9d8 Add comprehensive testing documentation and command hierarchy
Documents:
- COMMAND_HIERARCHY.md: Complete command structure and workflows
- TEST_RESULTS.md: Detailed test findings and bug list

Shows what works, what's broken, and what needs implementation
2025-11-25 01:49:04 -05:00
Vijay Janapa Reddi
0ed557286e Add 'tito source' command hierarchy for developer workflow
New command structure for developer operations on src/ files:
- tito source export <num>   - Export src/*.py → modules/*.ipynb → tinytorch/*.py
- tito source export --all    - Export all modules
- tito source test <num>      - Test source modules (planned)

Benefits:
- Clear hierarchy: 'source' = working with src/ directory
- Maps to directory structure: src/ → tito source
- Separates developer (source) from student (module) workflows
- More explicit than generic 'dev' naming

Commands:
- Students use: tito module start/complete
- Developers use: tito source export
- 'export' remains as shortcut for backward compatibility

Tested:
- tito source export 01_tensor 
- Generates notebook and exports to package 
2025-11-25 01:48:31 -05:00
Vijay Janapa Reddi
d3a126235c Restructure: Separate developer source (src/) from learner notebooks (modules/)
Major directory restructure to support both developer and learner workflows:

Structure Changes:
- NEW: src/ directory for Python source files (version controlled)
  - Files renamed: tensor.py → 01_tensor.py (matches directory naming)
  - All 20 modules moved from modules/ to src/
- CHANGED: modules/ now holds generated notebooks (gitignored)
  - Generated from src/*.py using jupytext
  - Learners work in notebooks, developers work in Python source
- UNCHANGED: tinytorch/ package (still auto-generated from notebooks)

Workflow: src/*.py → modules/*.ipynb → tinytorch/*.py

Command Updates:
- Updated export command to read from src/ and generate to modules/
- Export flow: discovers modules in src/, converts to notebooks in modules/, exports to tinytorch/
- All 20 modules tested and working

Configuration:
- Updated .gitignore to ignore modules/ directory
- Updated README.md with new three-layer architecture explanation
- Updated export.py source mappings and paths

Benefits:
- Clean separation: developers edit Python, learners use notebooks
- Better version control: only Python source committed, notebooks generated
- Flexible learning: can work in notebooks OR Python source
- Maintains backward compatibility: tinytorch package unchanged

Tested:
- Single module export: tito export 01_tensor 
- All modules export: tito export --all 
- Package imports: from tinytorch.core.tensor import Tensor 
- 20/20 modules successfully converted and exported
2025-11-25 00:02:21 -05:00
Vijay Janapa Reddi
68131e6be0 Add comprehensive JSON format documentation for progress tracking
Documents all JSON formats used for module progress, milestones, and system status. Includes combined export format for website integration and API endpoint suggestions.
2025-11-24 21:19:22 -05:00
Vijay Janapa Reddi
41f71e498a Update milestone span to nearly 70 years (1958-2025)
Changed from 66 years (1958-2024) to nearly 70 years (1958-2025):
- Abstract: 66 years → nearly 70 years, 2024 → 2025
- Conclusion: 66 years → nearly 70 years, 2024 → 2025
- Milestone M20: 2024 Capstone → 2025 Capstone

Reflects current year and provides better framing (67 years ≈ 70).
Paper compiles successfully with lualatex (25 pages, 383K).
2025-11-24 15:56:27 -05:00
Vijay Janapa Reddi
24b55c4658 Update milestone span to nearly 70 years (1958-2025)
Changed from 66 years (1958-2024) to nearly 70 years (1958-2025):
- Abstract: 66 years → nearly 70 years, 2024 → 2025
- Conclusion: 66 years → nearly 70 years, 2024 → 2025
- Milestone M20: 2024 Capstone → 2025 Capstone

Reflects current year and provides better framing (67 years ≈ 70).
Paper compiles successfully with lualatex (25 pages, 383K).
2025-11-24 15:56:27 -05:00
Vijay Janapa Reddi
73ee531d62 Correct technical claims to align with implementation
- Fix CIFAR-10 accuracy: 75%+ → 65-75% (matches capstone.py target)
- Standardize Module 20: Olympics/AI Olympics → Capstone (canonical name)
- Clarify NBGrader: Integrated with markers, but unvalidated
- Correct milestone span: 70 years → 66 years (1958-2024)
- Verify Conv2d loops: 7 loops confirmed correct

All changes align paper with actual TinyTorch implementation.
Paper compiles successfully (26 pages, no errors).
2025-11-24 15:42:23 -05:00
Vijay Janapa Reddi
f352eb2bd9 Correct technical claims to align with implementation
- Fix CIFAR-10 accuracy: 75%+ → 65-75% (matches capstone.py target)
- Standardize Module 20: Olympics/AI Olympics → Capstone (canonical name)
- Clarify NBGrader: Integrated with markers, but unvalidated
- Correct milestone span: 70 years → 66 years (1958-2024)
- Verify Conv2d loops: 7 loops confirmed correct

All changes align paper with actual TinyTorch implementation.
Paper compiles successfully (26 pages, no errors).
2025-11-24 15:42:23 -05:00
Vijay Janapa Reddi
4f06392de5 Apply formatting fixes to achieve 10/10 consistency
- Add 🧪 emoji to all test_module() docstrings (20 modules)
- Fix Module 16 (compression): Add if __name__ guards to 6 test functions
- Fix Module 08 (dataloader): Add if __name__ guard to test_training_integration

All modules now follow consistent formatting standards for release.
2025-11-24 15:07:32 -05:00
Vijay Janapa Reddi
6166c0f112 Apply formatting fixes to achieve 10/10 consistency
- Add 🧪 emoji to all test_module() docstrings (20 modules)
- Fix Module 16 (compression): Add if __name__ guards to 6 test functions
- Fix Module 08 (dataloader): Add if __name__ guard to test_training_integration

All modules now follow consistent formatting standards for release.
2025-11-24 15:07:32 -05:00
Vijay Janapa Reddi
9c0042f08d Add release check workflow and clean up legacy dev files
This commit implements a comprehensive quality assurance system and removes
outdated backup files from the repository.

## Release Check Workflow

Added GitHub Actions workflow for systematic release validation:
- Manual-only workflow (workflow_dispatch) - no automatic PR triggers
- 6 sequential quality gates: educational, implementation, testing, package, documentation, systems
- 13 validation scripts (4 fully implemented, 9 stubs for future work)
- Comprehensive documentation in .github/workflows/README.md
- Release process guide in .github/RELEASE_PROCESS.md

Implemented validators:
- validate_time_estimates.py - Ensures consistency between LEARNING_PATH.md and ABOUT.md files
- validate_difficulty_ratings.py - Validates star rating consistency across modules
- validate_testing_patterns.py - Checks for test_unit_* and test_module() patterns
- check_checkpoints.py - Recommends checkpoint markers for long modules (8+ hours)

## Pedagogical Improvements

Added checkpoint markers to Module 05 (Autograd):
- Checkpoint 1: After computational graph construction (~40% progress)
- Checkpoint 2: After automatic differentiation implementation (~80% progress)
- Helps students track progress through the longest foundational module (8-10 hours)

## Codebase Cleanup

Removed 20 legacy *_dev.py files across all modules:
- Confirmed via export system analysis: only *.py files (without _dev suffix) are used
- Export system explicitly reads from {name}.py (see tito/commands/export.py line 461)
- All _dev.py files were outdated backups not used by the build/export pipeline
- Verified all active .py files contain current implementations with optimizations

This cleanup:
- Eliminates confusion about which files are source of truth
- Reduces repository size
- Makes development workflow clearer (work in modules/XX_name/name.py)

## Formatting Standards Documentation

Documents formatting and style standards discovered through systematic
review of all 20 TinyTorch modules.

### Key Findings

Overall Status: 9/10 (Excellent consistency)
- All 20 modules use correct test_module() naming
- 18/20 modules have proper if __name__ guards
- All modules use proper Jupytext format (no JSON leakage)
- Strong ASCII diagram quality
- All 20 modules missing 🧪 emoji in test_module() docstrings

### Standards Documented

1. Test Function Naming: test_unit_* for units, test_module() for integration
2. if __name__ Guards: Immediate guards after every test/analysis function
3. Emoji Protocol: 🔬 for unit tests, 🧪 for module tests, 📊 for analysis
4. Markdown Formatting: Jupytext format with proper section hierarchy
5. ASCII Diagrams: Box-drawing characters, labeled dimensions, data flow arrows
6. Module Structure: Standard template with 9 sections

### Quick Fixes Identified

- Add 🧪 emoji to test_module() in all 20 modules (~5 min)
- Fix Module 16 if __name__ guards (~15 min)
- Fix Module 08 guard (~5 min)

Total quick fixes: 25 minutes to achieve 10/10 consistency
2025-11-24 14:47:04 -05:00
Vijay Janapa Reddi
bc3105a969 Add release check workflow and clean up legacy dev files
This commit implements a comprehensive quality assurance system and removes
outdated backup files from the repository.

## Release Check Workflow

Added GitHub Actions workflow for systematic release validation:
- Manual-only workflow (workflow_dispatch) - no automatic PR triggers
- 6 sequential quality gates: educational, implementation, testing, package, documentation, systems
- 13 validation scripts (4 fully implemented, 9 stubs for future work)
- Comprehensive documentation in .github/workflows/README.md
- Release process guide in .github/RELEASE_PROCESS.md

Implemented validators:
- validate_time_estimates.py - Ensures consistency between LEARNING_PATH.md and ABOUT.md files
- validate_difficulty_ratings.py - Validates star rating consistency across modules
- validate_testing_patterns.py - Checks for test_unit_* and test_module() patterns
- check_checkpoints.py - Recommends checkpoint markers for long modules (8+ hours)

## Pedagogical Improvements

Added checkpoint markers to Module 05 (Autograd):
- Checkpoint 1: After computational graph construction (~40% progress)
- Checkpoint 2: After automatic differentiation implementation (~80% progress)
- Helps students track progress through the longest foundational module (8-10 hours)

## Codebase Cleanup

Removed 20 legacy *_dev.py files across all modules:
- Confirmed via export system analysis: only *.py files (without _dev suffix) are used
- Export system explicitly reads from {name}.py (see tito/commands/export.py line 461)
- All _dev.py files were outdated backups not used by the build/export pipeline
- Verified all active .py files contain current implementations with optimizations

This cleanup:
- Eliminates confusion about which files are source of truth
- Reduces repository size
- Makes development workflow clearer (work in modules/XX_name/name.py)

## Formatting Standards Documentation

Documents formatting and style standards discovered through systematic
review of all 20 TinyTorch modules.

### Key Findings

Overall Status: 9/10 (Excellent consistency)
- All 20 modules use correct test_module() naming
- 18/20 modules have proper if __name__ guards
- All modules use proper Jupytext format (no JSON leakage)
- Strong ASCII diagram quality
- All 20 modules missing 🧪 emoji in test_module() docstrings

### Standards Documented

1. Test Function Naming: test_unit_* for units, test_module() for integration
2. if __name__ Guards: Immediate guards after every test/analysis function
3. Emoji Protocol: 🔬 for unit tests, 🧪 for module tests, 📊 for analysis
4. Markdown Formatting: Jupytext format with proper section hierarchy
5. ASCII Diagrams: Box-drawing characters, labeled dimensions, data flow arrows
6. Module Structure: Standard template with 9 sections

### Quick Fixes Identified

- Add 🧪 emoji to test_module() in all 20 modules (~5 min)
- Fix Module 16 if __name__ guards (~15 min)
- Fix Module 08 guard (~5 min)

Total quick fixes: 25 minutes to achieve 10/10 consistency
2025-11-24 14:47:04 -05:00
Vijay Janapa Reddi
0e306808f8 Updates module difficulty and time estimates
Refactors difficulty levels to use star ratings for better visual representation.

Adjusts time estimates for modules based on user feedback and complexity,
resulting in a more accurate learning path.
2025-11-24 12:56:26 -05:00
Vijay Janapa Reddi
8fc2ef1060 Updates module difficulty and time estimates
Refactors difficulty levels to use star ratings for better visual representation.

Adjusts time estimates for modules based on user feedback and complexity,
resulting in a more accurate learning path.
2025-11-24 12:56:26 -05:00
Vijay Janapa Reddi
c03996504e Optimizes scaled dot-product attention
Replaces explicit loops in scaled dot-product attention with
matrix operations for significant performance improvement.

Applies softmax activation from `tinytorch.core.activations` instead of numpy.

Includes a pedagogical note explaining the previous loop implementation.

Refactors multi-head attention to leverage the optimized
`scaled_dot_product_attention`.
2025-11-24 10:25:29 -05:00
Vijay Janapa Reddi
38c25c2f78 Optimizes scaled dot-product attention
Replaces explicit loops in scaled dot-product attention with
matrix operations for significant performance improvement.

Applies softmax activation from `tinytorch.core.activations` instead of numpy.

Includes a pedagogical note explaining the previous loop implementation.

Refactors multi-head attention to leverage the optimized
`scaled_dot_product_attention`.
2025-11-24 10:25:29 -05:00
Vijay Janapa Reddi
6722c3f1bc Update documentation references to reflect current repository structure
- Fix README.md: Replace broken references to non-existent files
  - Remove STUDENT_VERSION_TOOLING.md references (file does not exist)
  - Remove .claude/ directory references (internal development files)
  - Remove book/ directory references (does not exist)
  - Update instructor documentation links to point to existing files
  - Point to INSTRUCTOR.md, TA_GUIDE.md, and docs/ for resources

- Fix paper.tex: Update instructor resources list
  - Replace non-existent MAINTENANCE.md with TA_GUIDE.md
  - Maintenance commitment details remain in paragraph text
  - All referenced files now exist in repository

All documentation links now point to actual files in the repository
2025-11-22 21:57:21 -05:00
Vijay Janapa Reddi
0539465113 Update documentation references to reflect current repository structure
- Fix README.md: Replace broken references to non-existent files
  - Remove STUDENT_VERSION_TOOLING.md references (file does not exist)
  - Remove .claude/ directory references (internal development files)
  - Remove book/ directory references (does not exist)
  - Update instructor documentation links to point to existing files
  - Point to INSTRUCTOR.md, TA_GUIDE.md, and docs/ for resources

- Fix paper.tex: Update instructor resources list
  - Replace non-existent MAINTENANCE.md with TA_GUIDE.md
  - Maintenance commitment details remain in paragraph text
  - All referenced files now exist in repository

All documentation links now point to actual files in the repository
2025-11-22 21:57:21 -05:00
Vijay Janapa Reddi
ba482bab71 Clean up repository by removing planning and status documents
Removed 42 planning, brainstorming, and status tracking documents that served their purpose during development but are no longer needed for release.

Changes:
- Root: Removed 4 temporary/status files
- binder/: Removed 20 planning documents (kept essential setup files)
- docs/: Removed 16 planning/status documents (preserved all user-facing docs and website dependencies)
- tests/: Removed 2 status documents (preserved all test docs and milestone system)

Preserved files:
- All user-facing documentation (README, guides, quickstarts)
- All website dependencies (INSTRUCTOR_GUIDE, PRIVACY_DATA_RETENTION, TEAM_ONBOARDING)
- All functional configuration files
- All milestone system documentation (7 files in tests/milestones/)

Updated .gitignore to prevent future accumulation of internal development files (.claude/, site/_build/, log files, progress.json)
2025-11-22 21:05:57 -05:00
Vijay Janapa Reddi
1517c6f83d Clean up repository by removing planning and status documents
Removed 42 planning, brainstorming, and status tracking documents that served their purpose during development but are no longer needed for release.

Changes:
- Root: Removed 4 temporary/status files
- binder/: Removed 20 planning documents (kept essential setup files)
- docs/: Removed 16 planning/status documents (preserved all user-facing docs and website dependencies)
- tests/: Removed 2 status documents (preserved all test docs and milestone system)

Preserved files:
- All user-facing documentation (README, guides, quickstarts)
- All website dependencies (INSTRUCTOR_GUIDE, PRIVACY_DATA_RETENTION, TEAM_ONBOARDING)
- All functional configuration files
- All milestone system documentation (7 files in tests/milestones/)

Updated .gitignore to prevent future accumulation of internal development files (.claude/, site/_build/, log files, progress.json)
2025-11-22 21:05:57 -05:00
Vijay Janapa Reddi
c61f7ec7a6 Clean up milestone directories
- Removed 30 debugging and development artifact files
- Kept core system, documentation, and demo files
- tests/milestones: 9 clean files (system + docs)
- milestones/05_2017_transformer: 5 clean files (demos)
- Clear, focused directory structure
- Ready for students and developers
2025-11-22 20:30:58 -05:00
Vijay Janapa Reddi
0d6807cefb Clean up milestone directories
- Removed 30 debugging and development artifact files
- Kept core system, documentation, and demo files
- tests/milestones: 9 clean files (system + docs)
- milestones/05_2017_transformer: 5 clean files (demos)
- Clear, focused directory structure
- Ready for students and developers
2025-11-22 20:30:58 -05:00
Vijay Janapa Reddi
223e5f53e1 Add milestone system with clean architecture
- Single source of truth in milestone_tracker.py
- Zero code duplication across codebase
- Clean API: check_module_export(module_name, console)
- Gamified learning experience through ML history
- Progressive unlocking of 5 major milestones
- Comprehensive documentation for students and developers
- Integration with module workflow and CLI commands
2025-11-22 20:29:34 -05:00
Vijay Janapa Reddi
9767c78155 Add milestone system with clean architecture
- Single source of truth in milestone_tracker.py
- Zero code duplication across codebase
- Clean API: check_module_export(module_name, console)
- Gamified learning experience through ML history
- Progressive unlocking of 5 major milestones
- Comprehensive documentation for students and developers
- Integration with module workflow and CLI commands
2025-11-22 20:29:34 -05:00
Vijay Janapa Reddi
61a1680cb8 Fix Tensor slicing gradient tracking - position embeddings now learn
CRITICAL FIX: Monkey-patching for __getitem__ was not in source modules

PROBLEM:
- Previously modified tinytorch/core/autograd.py (compiled output)
- But NOT modules/05_autograd/autograd.py (source)
- Export regenerated compiled files WITHOUT the monkey-patching code
- Result: Tensor slicing had NO gradient tracking

SOLUTION:
1. Added tracked_getitem() to modules/05_autograd/autograd.py
2. Added _original_getitem store in enable_autograd()
3. Added Tensor.__getitem__ = tracked_getitem installation
4. Exported all modules (tensor, autograd, embeddings)

VERIFICATION TESTS:
 Tensor slicing attaches SliceBackward
 Gradients flow correctly: x[:3].backward() → x.grad = [1,1,1,0,0]
 Position embeddings.grad is not None and has non-zero values
 All 19/19 parameters get gradients and update

TRAINING RESULTS:
- Loss drops: 1.58 → 1.26 (vs 1.62→1.24 before)
- Training accuracy: 2.7% (vs 0% before)
- Test accuracy: Still 0% (needs hyperparameter tuning)

MODEL IS LEARNING (slightly) - this is progress!

Next steps: Hyperparameter tuning (more epochs, different LR, larger model)
2025-11-22 18:29:38 -05:00
Vijay Janapa Reddi
3e29b69ca8 Fix Tensor slicing gradient tracking - position embeddings now learn
CRITICAL FIX: Monkey-patching for __getitem__ was not in source modules

PROBLEM:
- Previously modified tinytorch/core/autograd.py (compiled output)
- But NOT modules/05_autograd/autograd.py (source)
- Export regenerated compiled files WITHOUT the monkey-patching code
- Result: Tensor slicing had NO gradient tracking

SOLUTION:
1. Added tracked_getitem() to modules/05_autograd/autograd.py
2. Added _original_getitem store in enable_autograd()
3. Added Tensor.__getitem__ = tracked_getitem installation
4. Exported all modules (tensor, autograd, embeddings)

VERIFICATION TESTS:
 Tensor slicing attaches SliceBackward
 Gradients flow correctly: x[:3].backward() → x.grad = [1,1,1,0,0]
 Position embeddings.grad is not None and has non-zero values
 All 19/19 parameters get gradients and update

TRAINING RESULTS:
- Loss drops: 1.58 → 1.26 (vs 1.62→1.24 before)
- Training accuracy: 2.7% (vs 0% before)
- Test accuracy: Still 0% (needs hyperparameter tuning)

MODEL IS LEARNING (slightly) - this is progress!

Next steps: Hyperparameter tuning (more epochs, different LR, larger model)
2025-11-22 18:29:38 -05:00
Vijay Janapa Reddi
0e135f1aea Implement Tensor slicing with progressive disclosure and fix embedding gradient flow
WHAT: Added Tensor.__getitem__ (slicing) following progressive disclosure principles

MODULE 01 (Tensor):
- Added __getitem__ method for basic slicing operations
- Clean implementation with NO gradient mentions (progressive disclosure)
- Supports all NumPy-style indexing: x[0], x[:3], x[1:4], x[:, 1]
- Ensures scalar results are wrapped in arrays

MODULE 05 (Autograd):
- Added SliceBackward function for gradient computation
- Implements proper gradient scatter: zeros everywhere except sliced positions
- Added monkey-patching in enable_autograd() for __getitem__
- Follows same pattern as existing operations (add, mul, matmul)

MODULE 11 (Embeddings):
- Updated PositionalEncoding to use Tensor slicing instead of .data
- Fixed multiple .data accesses that broke computation graphs
- Removed Tensor() wrapping that created gradient-disconnected leafs
- Uses proper Tensor operations to preserve gradient flow

TESTING:
- All 6 component tests PASS (Embedding, Attention, FFN, Residual, Forward, Training)
- 19/19 parameters get gradients (was 18/19 before)
- Loss dropping better: 1.54→1.08 (vs 1.62→1.24 before)
- Model still not learning (0% accuracy) - needs fresh session to test monkey-patching

WHY THIS MATTERS:
- Tensor slicing is FUNDAMENTAL - needed by transformers for position embeddings
- Progressive disclosure maintains educational integrity
- Follows existing TinyTorch architecture patterns
- Enables position embeddings to potentially learn (pending verification)

DOCUMENTS CREATED:
- milestones/05_2017_transformer/TENSOR_SLICING_IMPLEMENTATION.md
- milestones/05_2017_transformer/STATUS.md
- milestones/05_2017_transformer/FIXES_SUMMARY.md
- milestones/05_2017_transformer/DEBUG_REVERSAL.md
- tests/milestones/test_reversal_debug.py (component tests)

ARCHITECTURAL PRINCIPLE:
Progressive disclosure is not just nice-to-have, it's CRITICAL for educational systems.
Don't expose Module 05 concepts (gradients) in Module 01 (basic operations).
Monkey-patch when features are needed, not before.
2025-11-22 18:26:12 -05:00
Vijay Janapa Reddi
763cdd2bf2 Implement Tensor slicing with progressive disclosure and fix embedding gradient flow
WHAT: Added Tensor.__getitem__ (slicing) following progressive disclosure principles

MODULE 01 (Tensor):
- Added __getitem__ method for basic slicing operations
- Clean implementation with NO gradient mentions (progressive disclosure)
- Supports all NumPy-style indexing: x[0], x[:3], x[1:4], x[:, 1]
- Ensures scalar results are wrapped in arrays

MODULE 05 (Autograd):
- Added SliceBackward function for gradient computation
- Implements proper gradient scatter: zeros everywhere except sliced positions
- Added monkey-patching in enable_autograd() for __getitem__
- Follows same pattern as existing operations (add, mul, matmul)

MODULE 11 (Embeddings):
- Updated PositionalEncoding to use Tensor slicing instead of .data
- Fixed multiple .data accesses that broke computation graphs
- Removed Tensor() wrapping that created gradient-disconnected leafs
- Uses proper Tensor operations to preserve gradient flow

TESTING:
- All 6 component tests PASS (Embedding, Attention, FFN, Residual, Forward, Training)
- 19/19 parameters get gradients (was 18/19 before)
- Loss dropping better: 1.54→1.08 (vs 1.62→1.24 before)
- Model still not learning (0% accuracy) - needs fresh session to test monkey-patching

WHY THIS MATTERS:
- Tensor slicing is FUNDAMENTAL - needed by transformers for position embeddings
- Progressive disclosure maintains educational integrity
- Follows existing TinyTorch architecture patterns
- Enables position embeddings to potentially learn (pending verification)

DOCUMENTS CREATED:
- milestones/05_2017_transformer/TENSOR_SLICING_IMPLEMENTATION.md
- milestones/05_2017_transformer/STATUS.md
- milestones/05_2017_transformer/FIXES_SUMMARY.md
- milestones/05_2017_transformer/DEBUG_REVERSAL.md
- tests/milestones/test_reversal_debug.py (component tests)

ARCHITECTURAL PRINCIPLE:
Progressive disclosure is not just nice-to-have, it's CRITICAL for educational systems.
Don't expose Module 05 concepts (gradients) in Module 01 (basic operations).
Monkey-patch when features are needed, not before.
2025-11-22 18:26:12 -05:00