mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-05-06 00:37:42 -05:00
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
23 lines
544 B
Python
23 lines
544 B
Python
"""
|
|
Exception hierarchy for TinyTorch CLI.
|
|
"""
|
|
|
|
class TinyTorchCLIError(Exception):
|
|
"""Base exception for all CLI errors."""
|
|
pass
|
|
|
|
class ValidationError(TinyTorchCLIError):
|
|
"""Raised when validation fails."""
|
|
pass
|
|
|
|
class ExecutionError(TinyTorchCLIError):
|
|
"""Raised when command execution fails."""
|
|
pass
|
|
|
|
class EnvironmentError(TinyTorchCLIError):
|
|
"""Raised when environment setup is invalid."""
|
|
pass
|
|
|
|
class ModuleNotFoundError(TinyTorchCLIError):
|
|
"""Raised when a requested module is not found."""
|
|
pass |