11 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
7f45d93613 Fix all test bugs and add notebook execution support to tito
Test Fixes (External pytest tests - all passing):
- Module 03: Reverted .weights for test helper classes
- Module 08: Fixed DataLoader data format (tuple → list(zip()))
- Module 10: Use CharTokenizer instead of abstract Tokenizer
- Module 15: Fixed KVCache constructor args and seq_len
- Module 19: Fixed Benchmark constructor args

Tito CLI Improvements:
- Added module name resolver: "15" → "15_quantization"
- Added .ipynb file support in _get_dev_file_path()
- Added notebook-to-Python conversion using jupytext
- Inline tests now execute notebooks correctly

Results:
- External tests: 36/36 passing (100%)
- Tito inline tests: 15/20 passing (75%)
- Remaining failures are module code bugs, not test framework issues
2025-12-05 18:29:12 -08:00
Vijay Janapa Reddi
4264699b5f Update test files with progressive integration and checkpoint improvements 2025-12-04 11:08:17 -08:00
Vijay Janapa Reddi
4aeb3c9c69 Merge main into dev, resolving conflicts with dev's version 2025-12-03 07:26:43 -08:00
Vijay Janapa Reddi
df6247d0eb Add core tests for modules 06, 12, and 14-20
- Module 06: 7 tests for SGD/Adam optimizer weight updates
- Module 12: 9 tests for attention computation and gradient flow
- Modules 14-20: Educational tests with skip for unexported modules
- All tests include docstrings explaining WHAT, WHY, and HOW
2025-12-02 22:30:29 -08:00
Vijay Janapa Reddi
3a885601f9 Clean up repository
- Remove stale feature branches (kept debugging branch with unmerged work)
- Move test_spatial_core.py to correct directory (tests/09_spatial)
- Remove .tito user state from tracking (config.json, progress.json)
- Delete archived CLI commands (tito/commands/_archived/)
- Move standalone integration tests to tests/integration/
- Remove outdated audit/report markdown files
- Remove old template and deprecated test files
- Simplify .gitignore for .tito/ directory
2025-12-02 22:03:16 -05:00
Vijay Janapa Reddi
2b0a1db71e Fix all tests to pass: clean up stale and misaligned test files
Test cleanup:
- Remove misaligned progressive integration tests (wrong module assignments)
- Remove tests referencing non-existent classes (SimpleDataset, etc.)
- Remove tests with wrong API signatures (learning_rate vs lr, etc.)
- Fix parameter names: use_bias -> bias, weights -> weight
- Fix dtype tests: expect float32 (TinyTorch standard)
- Add MultiplyLayer definition where missing

Results:
- tito module test --all: 20/20 modules pass
- pytest tests/modules: 223 tests pass

Both inline tests and external tests now pass completely.
2025-12-02 14:30:31 -05:00
Vijay Janapa Reddi
bd7fcb2177 Release preparation: fix package exports, tests, and documentation
Package exports:
- Fix tinytorch/__init__.py to export all required components for milestones
- Add Dense as alias for Linear for compatibility
- Add loss functions (MSELoss, CrossEntropyLoss, BinaryCrossEntropyLoss)
- Export spatial operations, data loaders, and transformer components

Test infrastructure:
- Create tests/conftest.py to handle path setup
- Create tests/test_utils.py with shared test utilities
- Rename test_progressive_integration.py files to include module number
- Fix syntax errors in test files (spaces in class names)
- Remove stale test file referencing non-existent modules

Documentation:
- Update README.md with correct milestone file names
- Fix milestone requirements to match actual module dependencies

Export system:
- Run tito export --all to regenerate package from source modules
- Ensure all 20 modules are properly exported
2025-12-02 14:19:56 -05:00
Vijay Janapa Reddi
0af88840b1 Update test suite for module restructuring
Updated test imports and paths after modules/source/ removal:
- Progressive integration tests for modules 03, 06, 08, 13, 14
- Checkpoint integration tests
- Module completion orchestrator
- Optimizer integration tests
- Gradient flow regression tests

Updated test documentation:
- tests/README.md with new module paths
- tests/TEST_STRATEGY.md with restructuring notes

All tests now reference modules/XX_name/ instead of modules/source/.
2025-11-10 19:42:23 -05:00
Vijay Janapa Reddi
90581b23c0 Update test suite for module restructuring
Updated test imports and paths after modules/source/ removal:
- Progressive integration tests for modules 03, 06, 08, 13, 14
- Checkpoint integration tests
- Module completion orchestrator
- Optimizer integration tests
- Gradient flow regression tests

Updated test documentation:
- tests/README.md with new module paths
- tests/TEST_STRATEGY.md with restructuring notes

All tests now reference modules/XX_name/ instead of modules/source/.
2025-11-10 19:42:23 -05:00
Vijay Janapa Reddi
855edafef3 Rename test directories to match source module names exactly
- module_01 → 01_tensor
- module_02 → 02_activations
- module_03 → 03_layers
- module_04 → 04_losses
- module_05 → 05_autograd
- module_06 → 06_optimizers
- module_07 → 07_training
- module_08 → 08_dataloader
- module_09 → 09_spatial
- module_10 → 10_tokenization
- module_11 → 11_embeddings
- module_12 → 12_attention
- module_13 → 13_transformers
- module_14 → 14_kvcaching
- module_15 → 15_profiling

This prevents misalignment between source and test directories.
Tests now mirror the exact structure of modules/source/.
2025-09-30 12:24:48 -04:00
Vijay Janapa Reddi
6f86460ec0 Rename test directories to match source module names exactly
- module_01 → 01_tensor
- module_02 → 02_activations
- module_03 → 03_layers
- module_04 → 04_losses
- module_05 → 05_autograd
- module_06 → 06_optimizers
- module_07 → 07_training
- module_08 → 08_dataloader
- module_09 → 09_spatial
- module_10 → 10_tokenization
- module_11 → 11_embeddings
- module_12 → 12_attention
- module_13 → 13_transformers
- module_14 → 14_kvcaching
- module_15 → 15_profiling

This prevents misalignment between source and test directories.
Tests now mirror the exact structure of modules/source/.
2025-09-30 12:24:48 -04:00