Commit Graph

24 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
97e0563614 Add community and benchmark features with baseline validation
- Implement tito benchmark baseline and capstone commands
- Add SPEC-style normalization for baseline benchmarks
- Implement tito community join, update, leave, stats, profile commands
- Use project-local storage (.tinytorch/) for user data
- Add privacy-by-design with explicit consent prompts
- Update site documentation for community and benchmark features
- Add Marimo integration for online notebooks
- Clean up redundant milestone setup exploration docs
- Finalize baseline design: fast setup validation (~1 second) with normalized results
2025-11-20 00:17:21 -05:00
Vijay Janapa Reddi
6af57a4e79 Clean up repository: remove archive images and build artifacts
- Remove site/_static/archive/ Gemini images (no longer needed)
- Remove tinytorch.egg-info/ from git tracking (build artifact)
- Add *.pdf to .gitignore to ensure LaTeX PDFs are not tracked
- Local cleanup: removed LaTeX artifacts, __pycache__, and site/_build/
2025-11-19 22:44:00 -05:00
Vijay Janapa Reddi
8f1188c78b Clean up temporary review and analysis files
Remove temporary files from repository:
- COMPREHENSIVE_MODULE_REVIEW.md - Module review (temporary)
- paper/CITATIONS_TO_ADD.md - Citation recommendations (temporary)
- paper/CLAIM_EVIDENCE_MATRIX.md - Evidence validation (temporary)
- paper/EVIDENCE_INVENTORY.md - Evidence tracking (temporary)
- paper/LITERATURE_REVIEW_ASSESSMENT.md - Literature review (temporary)
- paper/PYTHON_DEVELOPER_TECHNICAL_REVIEW.md - Code review (temporary)
- paper/NEW_CITATIONS.bib - Temporary citations (content in references.bib)
- paper/proposed_figures.tex - Figure proposals (temporary)

Update .gitignore to prevent tracking these file types:
- Add patterns for *_REVIEW*, *_MATRIX, *_INVENTORY, *_ASSESSMENT
- Add NEW_CITATIONS.bib and proposed_figures.tex patterns
- These files are AI-generated temporary analysis artifacts

Update paper.pdf with latest compilation including caption styling.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 20:51:32 -05:00
Vijay Janapa Reddi
fda66004b1 Clean up LaTeX build artifacts and add to gitignore
- Add LaTeX build artifacts to .gitignore (aux, bbl, blg, out, etc.)
- Remove tracked build artifacts: paper.aux, paper.bbl, paper.blg, paper.out
- Remove empty benchmark_results.txt file

These files are regenerated on each compilation and should not be tracked.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 19:29:35 -05:00
Vijay Janapa Reddi
57111ea139 Fix failing module tests
- Fix 14_profiling: Replace Tensor with Linear model in test_module, fix profile_forward_pass calls
- Fix 15_quantization: Increase error tolerance for INT8 quantization test, add export marker for QuantizedLinear
- Fix 19_benchmarking: Return Tensor objects from RealisticModel.parameters(), handle memoryview in pred_array.flatten()
- Fix 20_capstone: Make imports optional (MixedPrecisionTrainer, QuantizedLinear, compression functions)
- Fix 20_competition: Create Flatten class since it doesn't exist in spatial module
- Fix 16_compression: Add export markers for magnitude_prune and structured_prune

All modules now pass their inline tests.
2025-11-12 14:19:33 -05:00
Vijay Janapa Reddi
d6d83aec90 Add site/_build/ to gitignore - temporary build artifacts should not be tracked 2025-11-12 11:42:58 -05:00
Vijay Janapa Reddi
673a261ee2 Update gitignore to exclude temporary analysis files
Added comprehensive patterns to ignore AI-generated temporary reports:
- Module review reports (*_REPORT*.md)
- Analysis summaries (*_SUMMARY.md, *_ANALYSIS.md)
- Fix tracking (*_FIXES*.md, *_CHANGES*.md)
- Verification scripts (VERIFY_*.py)
- Other temporary docs (*_CHECKLIST.md, *_GUIDE.md, etc.)

These files are generated during module reviews and debugging sessions
but are not part of the permanent codebase documentation.
2025-11-10 19:50:26 -05:00
Vijay Janapa Reddi
89c9e0dd7e Create TinyDigits educational dataset for self-contained TinyTorch
Replaces sklearn-sourced digits_8x8.npz with TinyTorch-branded dataset.

Changes:
- Created datasets/tinydigits/ (~51KB total)
  - train.pkl: 150 samples (15 per digit class 0-9)
  - test.pkl: 47 samples (balanced across digits)
  - README.md: Full curation documentation
  - LICENSE: BSD 3-Clause with sklearn attribution
  - create_tinydigits.py: Reproducible generation script

- Updated milestones to use TinyDigits:
  - mlp_digits.py: Now loads from datasets/tinydigits/
  - cnn_digits.py: Now loads from datasets/tinydigits/

- Removed old data:
  - datasets/tiny/ (67KB sklearn duplicate)
  - milestones/03_1986_mlp/data/ (67KB old location)

Dataset Strategy:
TinyTorch now ships with only 2 curated datasets:
1. TinyDigits (51KB) - 8x8 digits for MLP/CNN milestones
2. TinyTalks (140KB) - Q&A pairs for transformer milestone

Total: 191KB shipped data (perfect for RasPi0 deployment)

Rationale:
- Self-contained: No downloads, works offline
- Citable: TinyTorch educational infrastructure for white paper
- Portable: Tiny footprint enables edge device deployment
- Fast: <5 sec training enables instant student feedback

Updated .gitignore to allow TinyTorch curated datasets while
still blocking downloaded large datasets.
2025-11-10 16:59:43 -05:00
Vijay Janapa Reddi
0690b714f8 Clean up gitignore patterns to be more specific
- Remove overly broad patterns (*_ANALYSIS.md, *_AUDIT.md)
- Make report patterns more specific (MODULE_REVIEW_REPORT_*.md)
- Add clear comments explaining why directories are ignored
- Keep dataset ignores (data/, datasets/) as they are downloaded files
2025-11-10 10:24:06 -05:00
Vijay Janapa Reddi
4c7d81c97b Update gitignore to exclude datasets and temporary reports
Add patterns for data directories and module review reports
2025-11-10 10:19:28 -05:00
Vijay Janapa Reddi
6b25d80b70 Update gitignore to exclude all AI assistant folders
- Add .claude/ to ignore Claude AI configs
- Add .cursor/ to ignore Cursor AI configs
- Add .ai/ to ignore any AI assistant folders
2025-11-09 16:57:49 -05:00
Vijay Janapa Reddi
15fb87e445 Update gitignore for backup files and AI configs
- Add *.bak pattern to ignore backup files
- Add *.backup pattern to ignore backup files
- Add .claude/ directory to ignore AI assistant configs
2025-11-09 16:56:56 -05:00
Vijay Janapa Reddi
bd21e72bf6 fix: Replace wildcard gitignore that was preventing file checkout 2025-11-08 18:54:11 -05:00
Vijay Janapa Reddi
87db602a90 Complete Module 14 KV caching implementation
Module 14 updates:
- Added enable_kv_cache(model) for non-invasive integration
- Added disable_kv_cache(model) to restore original behavior
- Implemented monkey-patching pattern (like enable_autograd)
- Added integration tests for enable/disable functionality
- Updated completion documentation with systems engineering lessons
- Total: 1229 lines (implementation + integration + tests)

Key architectural decision:
Students ADD capabilities in new modules without modifying old ones.
Module 14 enhances Modules 12-13 through composition, not modification.

Pattern demonstrates:
- Forward-only learning (never go back to old modules)
- Non-invasive optimization (wrap, don't rewrite)
- Clean module boundaries (Module 14 imports 12, not vice versa)
- Production-like patterns (same as enable_autograd from Module 05)

CNN milestone fix:
- Added __call__ method to SimpleCNN for consistency with model API

Status: Module 14 production-ready for course deployment
2025-11-05 19:02:28 -05:00
Vijay Janapa Reddi
f853f9b929 Clean root directory: remove debug scripts, status files, and redundant docs 2025-10-26 19:03:15 -04:00
Vijay Janapa Reddi
234698d4a5 🧹 Remove book/_build/ artifacts from git tracking
- Added book/_build/ to .gitignore
- Removed 540 auto-generated Jupyter Book build files from tracking
- Files remain locally for viewing but won't be committed anymore
- Reduces repo size and prevents merge conflicts on generated files
2025-10-25 17:37:43 -04:00
Vijay Janapa Reddi
850fd1d973 Add .cursor/ and .claude/ to .gitignore and remove from tracking 2025-10-25 13:59:11 -04:00
Vijay Janapa Reddi
6187725af3 feat: Add CrossEntropyLoss autograd support + Milestone 03 MLP on digits
Key Changes:
- Implemented CrossEntropyBackward for gradient computation
- Integrated CrossEntropyLoss into enable_autograd() patching
- Created comprehensive loss gradient test suite
- Milestone 03: MLP digits classifier (77.5% accuracy)
- Shipped tiny 8x8 digits dataset (67KB) for instant demos
- Updated DataLoader module with ASCII visualizations

Tests:
- All 3 losses (MSE, BCE, CrossEntropy) now have gradient flow
- MLP successfully learns digit classification (6.9% → 77.5%)
- Integration tests pass

Technical:
- CrossEntropyBackward: softmax - one_hot gradient
- Numerically stable via log-softmax
- Works with raw class labels (no one-hot needed)
2025-09-30 16:22:09 -04:00
Vijay Janapa Reddi
d4cdd4506e Add tiny datasets infrastructure with 8×8 digits
Created datasets/tiny/ for shipping small datasets with TinyTorch:

New Structure:
- datasets/tiny/digits_8x8.npz (67KB, 1,797 samples)
  - 8×8 handwritten digits from UCI/sklearn
  - Normalized to [0-1], ready for immediate use
  - Perfect for DataLoader learning (Module 08)

- datasets/tiny/README.md
  - Full documentation and usage examples
  - Philosophy: tiny (learn) → full (practice) → custom (master)

- datasets/tiny/create_digits_8x8.py
  - Extraction script showing how dataset was created
  - Reproducible from sklearn.datasets.load_digits()

Updated .gitignore:
- Ignore datasets/* (downloaded large files)
- Allow datasets/tiny/ (shipped small files)
- Allow datasets/README.md and download scripts
- Selectively ignore .npz files (not in tiny/)

Benefits:
 Zero download friction for Module 08
 Offline-friendly (planes, classrooms, slow networks)
 Real handwritten digits (not synthetic noise)
 Git-friendly size (67KB vs 10MB MNIST)
 Same shape/format students will use for CNNs

Progression:
- Module 08: Learn DataLoader with 8×8 digits
- Milestone 03: Train on full 28×28 MNIST
- Milestone 04: Scale to CIFAR-10
2025-09-30 15:05:34 -04:00
Vijay Janapa Reddi
a4e0a34922 Update gitignore for NBGrader and virtual environment
- Add .venv/ to gitignore for virtual environment files
- Add gradebook.db* to gitignore for NBGrader database files
- Add assignments/submitted/, assignments/autograded/, assignments/feedback/ to gitignore
- Keep assignments/source/ and assignments/release/ tracked for educational content
2025-09-16 02:34:10 -04:00
Vijay Janapa Reddi
4674543caf Fix setup module and add comprehensive tests
- Fix syntax errors in setup_dev.py test cells (proper indentation)
- Add comprehensive test suite for setup module (test_setup.py)
- Test coverage: functions, SystemInfo class, integration tests
- Custom test runner (no pytest dependency required)
- All 9 tests pass successfully
- Update .gitignore to allow modules/ directory for educational structure
2025-07-10 18:52:14 -04:00
Vijay Janapa Reddi
5fc55f8cbe Been refactoring the structure, got setup working 2025-07-10 11:13:45 -04:00
Vijay Janapa Reddi
6ae440399d Refactors to use .venv for virtual environment
Updates the project to use `.venv` as the standard virtual environment directory. This change:

- Updates `.gitignore` to ignore `.venv/`.
- Modifies the activation script to create and activate `.venv`.
- Adjusts the `tito.py` script to check for `.venv`'s existence and activation.
- Updates documentation and setup scripts to reflect the new virtual environment naming convention.

This change streamlines environment management and aligns with common Python practices.
2025-07-09 17:40:08 -04:00
Vijay Janapa Reddi
92f4bb2c45 Adds initial .gitignore file
Adds a comprehensive .gitignore file to exclude common build artifacts, logs, temporary files, and other project-specific files that should not be tracked by Git.

This ensures a cleaner repository and prevents accidental inclusion of sensitive or unnecessary files.
2025-07-09 17:04:22 -04:00