Files
cs249r_book/tinytorch/bin/tito
Vijay Janapa Reddi 0c80ee116d fix: use bin/tito wrapper for CI preflight checks
- Remove pip install -e . requirement from CI workflow
- Add bin/tito wrapper script that sets PYTHONPATH and cwd
- Update preflight.py to use bin/tito instead of python -m tito.main
- Fix milestone command name (singular not plural)
- Use vars.TINYTORCH_ROOT with fallback to 'tinytorch'
2025-12-12 07:50:04 -08:00

28 lines
587 B
Python
Executable File

#!/usr/bin/env python3
"""
TinyTorch CLI wrapper - runs tito without requiring pip install.
Usage:
./bin/tito <command> [options]
Example:
./bin/tito dev preflight --ci
"""
import os
import sys
# Determine tinytorch root from this script's location
tinytorch_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Add to Python path so imports work
sys.path.insert(0, tinytorch_root)
# Change to tinytorch directory so Path.cwd() works correctly
os.chdir(tinytorch_root)
# Import and run main
from tito.main import main
if __name__ == "__main__":
main()