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
This commit is contained in:
Vijay Janapa Reddi
2026-01-24 12:22:37 -05:00
parent aafd7a8c67
commit 389989ece7
113 changed files with 214 additions and 22135 deletions

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env python3
"""
Run all tests for Module 16: Compression
"""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent.parent.parent))
def run_module_tests():
"""Run all tests for Module 16: Compression."""
from rich.console import Console
from rich.panel import Panel
console = Console()
console.print(Panel("[bold blue]Module 16: Compression - Test Suite[/bold blue]", expand=False))
test_files = list(Path(__file__).parent.glob("test_*.py"))
if not test_files:
console.print("[yellow]No test files found - tests not yet implemented[/yellow]")
return {'status': 'NO_TESTS', 'passed': 0, 'failed': 0}
console.print(f"[green]Found {len(test_files)} test files[/green]")
console.print("[dim]Test implementation pending...[/dim]")
return {'status': 'PENDING', 'passed': 0, 'failed': 0}
if __name__ == "__main__":
result = run_module_tests()
sys.exit(0 if result['status'] in ['SUCCESS', 'NO_TESTS', 'PENDING'] else 1)