Vijay Janapa Reddi
15f5a84863
RESTORE: Complete CLI functionality in new architecture
...
- Ported all commands from bin/tito.py to new tito/ CLI architecture
- Added InfoCommand with system info and module status
- Added TestCommand with pytest integration
- Added DoctorCommand with environment diagnosis
- Added SyncCommand for nbdev export functionality
- Added ResetCommand for package cleanup
- Added JupyterCommand for notebook server
- Added NbdevCommand for nbdev development tools
- Added SubmitCommand and StatusCommand (placeholders)
- Fixed missing imports in tinytorch/core/tensor.py
- All commands now work with 'tito' command in shell
- Maintains professional architecture while restoring full functionality
Commands restored:
✅ info - System information and module status
✅ test - Run module tests with pytest
✅ doctor - Environment diagnosis
✅ sync - Export notebooks to package
✅ reset - Clean tinytorch package
✅ nbdev - nbdev development commands
✅ jupyter - Start Jupyter server
✅ submit - Module submission
✅ status - Module status
✅ notebooks - Build notebooks from Python files
The CLI now has both the professional architecture and all original functionality.
2025-07-10 22:39:23 -04:00
Vijay Janapa Reddi
a92a5530ef
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
2025-07-10 22:08:56 -04:00
Vijay Janapa Reddi
05379c8570
Refactor CLI to senior software engineer standards
...
BREAKING CHANGE: Major architectural refactoring of CLI system
New Professional Architecture:
- Clean separation of concerns with proper package structure
- Command pattern implementation with base classes
- Centralized configuration management
- Proper exception hierarchy and error handling
- Logging framework integration
- Type hints throughout
- Dependency injection pattern
Structure:
tinytorch/cli/
├── __init__.py # Package initialization
├── main.py # Professional CLI entry point
├── core/ # Core CLI functionality
│ ├── __init__.py
│ ├── config.py # Configuration management
│ ├── console.py # Centralized console output
│ └── exceptions.py # Exception hierarchy
├── commands/ # Command implementations
│ ├── __init__.py
│ ├── base.py # Base command class
│ └── notebooks.py # Notebooks command
└── tools/ # CLI tools
├── __init__.py
└── py_to_notebook.py # Conversion tool
Features Added:
- Proper entry points in pyproject.toml
- Professional logging with file output
- Environment validation with detailed error messages
- Dry-run mode for notebooks command
- Force rebuild option
- Timeout protection for subprocess calls
- Backward compatibility wrapper (bin/tito)
- Extensible command registration system
Benefits:
- Maintainable: Single responsibility per module
- Testable: Clean interfaces and dependency injection
- Extensible: Easy to add new commands
- Professional: Industry-standard patterns
- Robust: Proper error handling and validation
- Installable: Proper package structure with entry points
2025-07-10 22:05:10 -04:00
Vijay Janapa Reddi
5fc55f8cbe
Been refactoring the structure, got setup working
2025-07-10 11:13:45 -04:00