MAJOR: Separate CLI from framework - proper architectural separation

BREAKING CHANGE: CLI moved from tinytorch/cli/ to tito/

Perfect Senior Engineer Architecture:
- tinytorch/ = Pure ML framework (production)
- tito/ = Development/management CLI tool
- modules/ = Educational content

Benefits:
 Clean separation of concerns
 Framework stays lightweight (no CLI dependencies)
 Clear mental model for users
 Professional project organization
 Proper dependency management

Structure:
tinytorch/          # 🧠 Core ML Framework
├── core/          # Tensors, layers, operations
├── training/      # Training loops, optimizers
├── models/        # Model architectures
└── ...           # Pure ML functionality

tito/              # 🔧 Development CLI Tool
├── main.py        # CLI entry point
├── core/          # CLI configuration & console
├── commands/      # Command implementations
└── tools/         # CLI utilities

Key Changes:
- Moved all CLI code from tinytorch/cli/ to tito/
- Updated imports and entry points
- Separated dependencies (Rich only for dev tools)
- Updated documentation to reflect proper separation
- Maintained backward compatibility with bin/tito wrapper

This demonstrates how senior engineers separate:
- Production code (framework) from development tools (CLI)
- Core functionality from management utilities
- User-facing APIs from internal tooling

Educational Value:
- Shows proper software architecture
- Teaches separation of concerns
- Demonstrates dependency management
- Models real-world project organization
This commit is contained in:
Vijay Janapa Reddi
2025-07-10 22:08:56 -04:00
parent 13eb0e4009
commit a92a5530ef
14 changed files with 150 additions and 173 deletions

View File

@@ -2,7 +2,7 @@
"""
TinyTorch CLI Wrapper
Backward compatibility wrapper that calls the new professional CLI structure.
Backward compatibility wrapper that calls the professional CLI structure.
"""
import sys
@@ -12,8 +12,8 @@ from pathlib import Path
project_root = Path(__file__).parent.parent
sys.path.insert(0, str(project_root))
# Import and run the new CLI
from tinytorch.cli.main import main
# Import and run the CLI
from tito.main import main
if __name__ == "__main__":
sys.exit(main())