Commit Graph

4 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
389989ece7 refactor(tests): clean up test folder and fix gradient flow issues
Test Cleanup (113 files, -22,000 lines):
- Remove 21 redundant run_all_tests.py files
- Remove checkpoints/ folder (22 obsolete checkpoint files)
- Remove progressive/, debugging/, diagnostic/ folders
- Remove duplicate integration tests and examples
- Remove orphaned dev artifacts and generated outputs
- Consolidate test_gradient_flow_overall.py into system/

Documentation Cleanup (4 files removed):
- Remove duplicate HOW_TO_USE.md, WORKFLOW.md, SYSTEM_DESIGN.md
- Trim environment/README.md from 334 to 86 lines
- Update capstone/README.md removing outdated bug references

Test Fixes:
- Add requires_grad=True to layer parameters in gradient tests
- Fix PositionalEncoding argument order in test_shapes.py
- Adjust performance thresholds for realistic expectations
- Fix gradient clipping to handle memoryview correctly
- Update zero_grad assertions to accept None or zeros
2026-01-24 12:22:37 -05:00
Vijay Janapa Reddi
42face28fb refactor(tests): remove all pytest.skip patterns for honest test results
- Move imports to module level in all *_core.py test files (16 files)
- Remove try/except/skip patterns from integration tests
- Remove @pytest.mark.skip decorators from gradient flow tests
- Convert environment validation skips to warnings for optional checks
- Change milestone tests from skip to fail when scripts missing

Tests now either pass or fail - no silent skipping that hides issues.
This ensures the test suite provides accurate feedback about what works.
2026-01-23 23:06:23 -05:00
Vijay Janapa Reddi
394a539870 test: update module dependencies for 17/18 swap 2025-12-19 19:30:41 -05:00
Vijay Janapa Reddi
d43b6c5e33 fix: align test directory numbering with module numbering (15-17)
- Renamed tests/15_memoization -> tests/17_memoization
- Renamed tests/16_quantization -> tests/15_quantization
- Renamed tests/17_compression -> tests/16_compression

Also expanded test coverage:
- Module 15 (Quantization): Added 4 new tests for edge cases, ordering, negative values, QuantizedLinear
- Module 16 (Compression): Added 5 new tests for target sparsity, large weight preservation, structured pruning
- Module 17 (Memoization): Added 4 new tests for multiple tokens, multiple layers, seq_pos tracking, error handling

All 24 tests for modules 15-17 now pass.
2025-12-14 13:40:46 -05:00