Back to Cs249r Book

TITO Command Reference

tinytorch/site/tito/overview.md

latest13.2 KB
Original Source

TITO Command Reference

<div style="background: #f8f9fa; padding: 2rem; border-radius: 0.5rem; margin: 2rem 0; text-align: center;"> <h2 style="margin: 0 0 1rem 0; color: #495057;">Master the TinyTorch CLI</h2> <p style="margin: 0; font-size: 1.1rem; color: #6c757d;">Complete command reference for building ML systems efficiently</p> </div>

Purpose: Quick reference for all TITO commands. Find the right command for every task in your ML systems engineering journey.

Quick Start: Three Commands You Need

<div style="display: grid; grid-template-columns: 1fr; gap: 1rem; margin: 2rem 0;"> <div style="background: #e3f2fd; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #2196f3;"> <h4 style="margin: 0 0 0.5rem 0; color: #1976d2;">1. Check Your Environment</h4> <code style="background: #263238; color: #ffffff; padding: 0.5rem; border-radius: 0.25rem; display: block; margin: 0.5rem 0;">tito system health</code> <p style="margin: 0.5rem 0 0 0; font-size: 0.9rem; color: #64748b;">Verify your setup is ready for development</p> </div> <div style="background: #fffbeb; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #f59e0b;"> <h4 style="margin: 0 0 0.5rem 0; color: #d97706;">2. Build & Export Modules</h4> <code style="background: #263238; color: #ffffff; padding: 0.5rem; border-radius: 0.25rem; display: block; margin: 0.5rem 0;">tito module complete 01</code> <p style="margin: 0.5rem 0 0 0; font-size: 0.9rem; color: #64748b;">Export your module to the TinyTorch package</p> </div> <div style="background: #f3e5f5; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #9c27b0;"> <h4 style="margin: 0 0 0.5rem 0; color: #7b1fa2;">3. Run Historical Milestones</h4> <code style="background: #263238; color: #ffffff; padding: 0.5rem; border-radius: 0.25rem; display: block; margin: 0.5rem 0;">tito milestone run 03</code> <p style="margin: 0.5rem 0 0 0; font-size: 0.9rem; color: #64748b;">Recreate ML history with YOUR code</p> </div> </div>

Commands by User Role

TinyTorch serves three types of users. Choose your path:

<div style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin: 2rem 0;"> <div style="background: #e3f2fd; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #2196f3;"> <h3 style="margin: 0 0 1rem 0; color: #1976d2;"> Student / Learner</h3> <p style="margin: 0 0 1rem 0; font-size: 0.9rem; color: #37474f;">You're learning ML systems by building from scratch</p>

Your Workflow:

bash
# Start learning
tito module start 01

# Complete modules
tito module complete 01

# Validate with history
tito milestone run 03

# Track progress
tito module status

Key Commands:

  • tito module - Build components
  • tito milestone - Validate
  • tito module status - Track progress
</div> <div style="background: #fff3e0; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #f57c00;"> <h3 style="margin: 0 0 1rem 0; color: #e65100;"> Instructor</h3> <p style="margin: 0 0 1rem 0; font-size: 0.9rem; color: #37474f;">You're teaching ML systems engineering</p>

Your Workflow:

bash
# Initialize nbgrader environment
tito nbgrader init

# Generate assignments
tito nbgrader generate 01

# Distribute to students
tito nbgrader release 01

# Collect & grade
tito nbgrader collect 01
tito nbgrader autograde 01

# Provide feedback
tito nbgrader feedback 01

# View analytics & export grades
tito nbgrader status
tito nbgrader analytics 01
tito nbgrader report

Key Commands:

  • tito nbgrader - Assignment management
  • tito module - Test implementations
  • tito milestone - Validate setups
</div> <div style="background: #f3e5f5; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #9c27b0;"> <h3 style="margin: 0 0 1rem 0; color: #7b1fa2;">👩💻 Developer / Contributor</h3> <p style="margin: 0 0 1rem 0; font-size: 0.9rem; color: #37474f;">You're contributing to TinyTorch modules</p>

Your Workflow:

bash
# Edit source code
# src/01_tensor/01_tensor.py

# Export to notebooks & package
tito dev export 01
tito dev export --all

# Test implementations
tito dev test --unit
tito dev test --inline --module 01

# Before merging
tito dev test --all

Key Commands:

  • tito dev test - Run tests
  • tito dev export - Rebuild curriculum
  • tito milestone - Validate with history
</div> </div>

Complete Command Reference

Setup Command

Purpose: First-time environment and profile setup

CommandDescriptionGuide
tito setupSet up development environment (venv, packages, profile)Module Workflow

System Commands

Purpose: Environment health, validation, and configuration

CommandDescriptionGuide
tito system healthEnvironment health check and validationModule Workflow
tito system infoSystem resources (paths, disk, memory)Module Workflow
tito system jupyterStart Jupyter Lab serverModule Workflow
tito system updateCheck for and install updatesModule Workflow
tito system resetReset TinyTorch to pristine stateTroubleshooting

Module Commands

Purpose: Build-from-scratch workflow (your main development cycle)

CommandDescriptionGuide
tito module listList all available modulesModule Workflow
tito module start XXBegin working on a module (first time)Module Workflow
tito module view XXOpen module notebook (no status update)Module Workflow
tito module resume XXContinue working on a moduleModule Workflow
tito module complete XXTest, export, and track module completionModule Workflow
tito module test XXRun module tests independentlyModule Workflow
tito module statusView module completion progressModule Workflow
tito module reset XXReset module to clean stateModule Workflow

See: Module Workflow Guide for complete details

Milestone Commands

Purpose: Run historical ML recreations with YOUR implementations

CommandDescriptionGuide
tito milestone listShow all 6 historical milestones (1958-2018)Milestone System
tito milestone run XXRun milestone with prerequisite checkingMilestone System
tito milestone info XXGet detailed milestone informationMilestone System
tito milestone statusView milestone progress and achievementsMilestone System
tito milestone timelineVisual timeline of your journeyMilestone System
tito milestone test XXTest milestone achievement requirementsMilestone System
tito milestone demo XXRun milestone capability demonstrationMilestone System

See: Milestone System Guide for complete details

Progress & Data Commands

Purpose: Track progress and manage user data

CommandDescriptionGuide
tito module statusView module completion progressProgress & Data
tito milestone statusView milestone achievementsProgress & Data
tito module reset XXReset a specific moduleProgress & Data

See: Progress & Data Management for complete details

Community Commands

Purpose: Join the global TinyTorch community and track your progress

CommandDescriptionGuide
tito community loginLog in to the community via web browserCommunity Guide
tito community logoutLog out of the communityCommunity Guide
tito community profileView/edit your community profileCommunity Guide
tito community statusShow login status and user infoCommunity Guide
tito community mapOpen global community mapCommunity Guide

See: Community Guide for complete details

Benchmark Commands

Purpose: Validate setup and measure performance

CommandDescriptionGuide
tito benchmark baselineQuick setup validation ("Hello World")Troubleshooting
tito benchmark capstoneFull Module 20 performance evaluationTroubleshooting

See: Troubleshooting for validation and benchmark help

Developer Commands

Purpose: Source code development, testing, and contribution (for developers only)

CommandDescriptionUse Case
tito dev export <module>Export src/ → modules/ → tinytorch/After editing source files
tito dev export --allExport all modulesAfter major refactoring
tito dev testRun unit tests (default)Quick validation
tito dev test --inlineRun inline tests from src/After editing modules
tito dev test --unitRun pytest unit testsComponent validation
tito dev test --cliRun CLI testsAfter CLI changes
tito dev test --integrationRun integration testsCross-module validation
tito dev test --e2eRun end-to-end testsUser journey validation
tito dev test --milestoneRun milestone testsFull package validation
tito dev test --allRun all test typesBefore PRs
tito dev test --releaseFull release validation (destructive)Before releases only

Note: These commands work with src/XX_name/XX_name.py files and are for TinyTorch contributors/developers. Students use tito module commands to work with generated notebooks.

See: Developer Testing Guide for complete testing documentation

Directory Structure:

src/              ← Developers edit here (Python source)
modules/          ← Students use these (generated notebooks)
tinytorch/        ← Package code (auto-generated)

Command Groups by Task

First-Time Setup

bash
# Install TinyTorch (downloads and sets up everything)
curl -sSL mlsysbook.ai/tinytorch/install.sh | bash
cd tinytorch
source .venv/bin/activate

# First-time profile setup
tito setup

# Verify environment
tito system health

Student Workflow (Learning)

bash
# Start or continue a module
tito module start 01      # First time
tito module resume 01     # Continue later

# Export when complete
tito module complete 01

# Check progress
tito module status

Developer Workflow (Contributing)

bash
# Edit source files in src/
vim src/01_tensor/01_tensor.py

# Export to notebooks + package
tito dev export 01

# Run tests
tito dev test --unit           # Quick validation
tito dev test --inline --module 01   # Test specific module

# Test implementation
python -c "from tinytorch import Tensor; print(Tensor([1,2,3]))"

# Before PR: run all tests
tito dev test --all

Achievement & Validation

bash
# See available milestones
tito milestone list

# Get details
tito milestone info 03

# Run milestone
tito milestone run 03

# View achievements
tito milestone status

Progress Management

bash
# View all progress
tito module status
tito milestone status

Typical Session Flow

Here's what a typical TinyTorch session looks like:

<div style="background: #f8f9fa; padding: 1.5rem; border: 1px solid #dee2e6; border-radius: 0.5rem; margin: 1.5rem 0;">

1. Start Session

bash
cd tinytorch
source .venv/bin/activate
tito system health         # Verify environment

2. Work on Module

bash
tito module start 03       # Or: tito module resume 03
# Edit in Jupyter Lab...

3. Export & Test

bash
tito module complete 03

4. Run Milestone (when prerequisites met)

bash
tito milestone list        # Check if ready
tito milestone run 03      # Run with YOUR code

5. Track Progress

bash
tito module status         # See module progress
tito milestone status      # See milestone achievements
</div>

Command Help

Every command has detailed help text:

bash
# Top-level help
tito --help

# Command group help
tito module --help
tito milestone --help

# Specific command help
tito module complete --help
tito milestone run --help

Detailed Guides

Master these commands and you'll build ML systems with confidence. Every command is designed to accelerate your learning and keep you focused on what matters: building production-quality ML frameworks from scratch.