Merge feature/tinytorch-core: fix TITO reference docs

This commit is contained in:
Vijay Janapa Reddi
2026-02-16 14:30:54 -05:00
5 changed files with 118 additions and 45 deletions

View File

@@ -49,9 +49,9 @@ graph LR
<p style="margin: 0.5rem 0; font-size: 0.95rem; color: #37474f;">What you ACHIEVE (01-06)</p> <p style="margin: 0.5rem 0; font-size: 0.95rem; color: #37474f;">What you ACHIEVE (01-06)</p>
<ul style="margin: 0.5rem 0 0 0; padding-left: 1.5rem; font-size: 0.9rem; color: #546e7a;"> <ul style="margin: 0.5rem 0 0 0; padding-left: 1.5rem; font-size: 0.9rem; color: #546e7a;">
<li>Perceptron (1958)</li> <li>Perceptron (1958)</li>
<li>XOR Crisis (1969)</li>
<li>MLP Revival (1986)</li> <li>MLP Revival (1986)</li>
<li>CNN Revolution (1998)</li> <li>CNN Revolution (1998)</li>
<li>AlexNet Era (2012)</li>
<li>Transformer Era (2017)</li> <li>Transformer Era (2017)</li>
<li>MLPerf (2018)</li> <li>MLPerf (2018)</li>
</ul> </ul>
@@ -170,7 +170,7 @@ Module Progress:
07 Optimizers 07 Optimizers
08 Training 08 Training
09 Convolutions 09 Convolutions
10 Normalization 10 Tokenization
... ...
Milestone Achievements: Milestone Achievements:

View File

@@ -261,6 +261,7 @@ tito milestone run 03
Module 05 - complete Module 05 - complete
Module 06 - complete Module 06 - complete
Module 07 - complete Module 07 - complete
Module 08 - complete
All prerequisites met! All prerequisites met!
``` ```
@@ -282,13 +283,13 @@ You'll see a helpful error:
```bash ```bash
Missing Required Modules Missing Required Modules
Milestone 03 requires modules: 01, 02, 03, 04, 05, 06, 07 Milestone 03 requires modules: 01, 02, 03, 04, 05, 06, 07, 08
Missing: 05, 06, 07 Missing: 06, 07, 08
Complete the missing modules first: Complete the missing modules first:
tito module start 05
tito module start 06 tito module start 06
tito module start 07 tito module start 07
tito module start 08
``` ```
## Achievement Celebration ## Achievement Celebration
@@ -315,7 +316,7 @@ Achievement saved to your progress!
What's Next: What's Next:
Milestone 04: CNN Revolution (1998) Milestone 04: CNN Revolution (1998)
Unlock by completing modules: 08, 09 Unlock by completing module: 09
``` ```
## Understanding Your Progress ## Understanding Your Progress

View File

@@ -77,8 +77,8 @@ Here's what a complete session looks like:
**1. Start Session** **1. Start Session**
```bash ```bash
cd TinyTorch cd tinytorch
source activate.sh source .venv/bin/activate
tito system health # Verify environment tito system health # Verify environment
``` ```
@@ -182,6 +182,18 @@ Convenience command to launch Jupyter Lab from the correct directory.
## Module Lifecycle Commands ## Module Lifecycle Commands
### List Available Modules
<div style="background: #e8eaf6; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #5c6bc0; margin: 1.5rem 0;">
```bash
tito module list
```
**What this does**: Shows all 20 modules with names and tier groupings.
</div>
### Start a Module (First Time) ### Start a Module (First Time)
<div style="background: #fffbeb; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #f59e0b; margin: 1.5rem 0;"> <div style="background: #fffbeb; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #f59e0b; margin: 1.5rem 0;">
@@ -223,6 +235,20 @@ tito module resume 01
</div> </div>
### View a Module (Read-Only)
<div style="background: #e8eaf6; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #5c6bc0; margin: 1.5rem 0;">
```bash
tito module view 01
```
**What this does**: Opens the module notebook in Jupyter Lab without updating any status tracking. Useful for reviewing a module you've already completed or browsing ahead.
**Difference from start/resume**: No progress tracking changes, no backup creation.
</div>
### Complete & Export (Essential) ### Complete & Export (Essential)
<div style="background: #f0fdf4; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #22c55e; margin: 1.5rem 0;"> <div style="background: #f0fdf4; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #22c55e; margin: 1.5rem 0;">
@@ -260,6 +286,24 @@ print(x.grad) # Uses YOUR autograd!
</div> </div>
### Test a Module (Without Exporting)
<div style="background: #e3f2fd; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #2196f3; margin: 1.5rem 0;">
```bash
tito module test 01
```
**What this does**: Runs inline, pytest, and integration tests for a module without exporting or updating progress. Useful for checking your work before committing to `complete`.
**Options**:
- `--all` — Test all modules
- `--verbose` / `-v` — Show detailed output
- `--unit-only` — Skip integration tests
- `--stop-on-fail` — Stop at first failure
</div>
### View Progress ### View Progress
<div style="background: #fef3c7; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #f59e0b; margin: 1.5rem 0;"> <div style="background: #fef3c7; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #f59e0b; margin: 1.5rem 0;">
@@ -401,9 +445,12 @@ tinytorch/
**Solution**: **Solution**:
```bash ```bash
# Re-run setup # Re-activate environment
./setup-environment.sh cd tinytorch
source activate.sh source .venv/bin/activate
# Re-run setup if needed
tito setup
# Verify # Verify
tito system health tito system health

View File

@@ -70,6 +70,9 @@ tito module status
**Your Workflow:** **Your Workflow:**
```bash ```bash
# Initialize nbgrader environment
tito nbgrader init
# Generate assignments # Generate assignments
tito nbgrader generate 01 tito nbgrader generate 01
@@ -82,6 +85,11 @@ tito nbgrader autograde 01
# Provide feedback # Provide feedback
tito nbgrader feedback 01 tito nbgrader feedback 01
# View analytics & export grades
tito nbgrader status
tito nbgrader analytics 01
tito nbgrader report
``` ```
**Key Commands:** **Key Commands:**
@@ -124,6 +132,14 @@ tito dev test --all
## Complete Command Reference ## Complete Command Reference
### Setup Command
**Purpose**: First-time environment and profile setup
| Command | Description | Guide |
|---------|-------------|-------|
| `tito setup` | Set up development environment (venv, packages, profile) | [Module Workflow](modules.md) |
### System Commands ### System Commands
**Purpose**: Environment health, validation, and configuration **Purpose**: Environment health, validation, and configuration
@@ -133,6 +149,8 @@ tito dev test --all
| `tito system health` | Environment health check and validation | [Module Workflow](modules.md) | | `tito system health` | Environment health check and validation | [Module Workflow](modules.md) |
| `tito system info` | System resources (paths, disk, memory) | [Module Workflow](modules.md) | | `tito system info` | System resources (paths, disk, memory) | [Module Workflow](modules.md) |
| `tito system jupyter` | Start Jupyter Lab server | [Module Workflow](modules.md) | | `tito system jupyter` | Start Jupyter Lab server | [Module Workflow](modules.md) |
| `tito system update` | Check for and install updates | [Module Workflow](modules.md) |
| `tito system reset` | Reset TinyTorch to pristine state | [Troubleshooting](troubleshooting.md) |
### Module Commands ### Module Commands
@@ -140,9 +158,12 @@ tito dev test --all
| Command | Description | Guide | | Command | Description | Guide |
|---------|-------------|-------| |---------|-------------|-------|
| `tito module list` | List all available modules | [Module Workflow](modules.md) |
| `tito module start XX` | Begin working on a module (first time) | [Module Workflow](modules.md) | | `tito module start XX` | Begin working on a module (first time) | [Module Workflow](modules.md) |
| `tito module view XX` | Open module notebook (no status update) | [Module Workflow](modules.md) |
| `tito module resume XX` | Continue working on a module | [Module Workflow](modules.md) | | `tito module resume XX` | Continue working on a module | [Module Workflow](modules.md) |
| `tito module complete XX` | Test, export, and track module completion | [Module Workflow](modules.md) | | `tito module complete XX` | Test, export, and track module completion | [Module Workflow](modules.md) |
| `tito module test XX` | Run module tests independently | [Module Workflow](modules.md) |
| `tito module status` | View module completion progress | [Module Workflow](modules.md) | | `tito module status` | View module completion progress | [Module Workflow](modules.md) |
| `tito module reset XX` | Reset module to clean state | [Module Workflow](modules.md) | | `tito module reset XX` | Reset module to clean state | [Module Workflow](modules.md) |
@@ -159,6 +180,8 @@ tito dev test --all
| `tito milestone info XX` | Get detailed milestone information | [Milestone System](milestones.md) | | `tito milestone info XX` | Get detailed milestone information | [Milestone System](milestones.md) |
| `tito milestone status` | View milestone progress and achievements | [Milestone System](milestones.md) | | `tito milestone status` | View milestone progress and achievements | [Milestone System](milestones.md) |
| `tito milestone timeline` | Visual timeline of your journey | [Milestone System](milestones.md) | | `tito milestone timeline` | Visual timeline of your journey | [Milestone System](milestones.md) |
| `tito milestone test XX` | Test milestone achievement requirements | [Milestone System](milestones.md) |
| `tito milestone demo XX` | Run milestone capability demonstration | [Milestone System](milestones.md) |
**See**: [Milestone System Guide](milestones.md) for complete details **See**: [Milestone System Guide](milestones.md) for complete details
@@ -194,10 +217,10 @@ tito dev test --all
| Command | Description | Guide | | Command | Description | Guide |
|---------|-------------|-------| |---------|-------------|-------|
| `tito benchmark baseline` | Quick setup validation ("Hello World") | [Community Guide](../community.md) | | `tito benchmark baseline` | Quick setup validation ("Hello World") | [Troubleshooting](troubleshooting.md) |
| `tito benchmark capstone` | Full Module 20 performance evaluation | [Community Guide](../community.md) | | `tito benchmark capstone` | Full Module 20 performance evaluation | [Troubleshooting](troubleshooting.md) |
**See**: [Community Guide](../community.md) for complete details **See**: [Troubleshooting](troubleshooting.md) for validation and benchmark help
### Developer Commands ### Developer Commands
@@ -235,11 +258,13 @@ tinytorch/ ← Package code (auto-generated)
### First-Time Setup ### First-Time Setup
```bash ```bash
# Clone and setup # Install TinyTorch (downloads and sets up everything)
git clone https://github.com/harvard-edge/cs249r_book.git curl -sSL mlsysbook.ai/tinytorch/install.sh | bash
cd TinyTorch cd tinytorch
./setup-environment.sh source .venv/bin/activate
source activate.sh
# First-time profile setup
tito setup
# Verify environment # Verify environment
tito system health tito system health
@@ -312,8 +337,8 @@ Here's what a typical TinyTorch session looks like:
**1. Start Session** **1. Start Session**
```bash ```bash
cd TinyTorch cd tinytorch
source activate.sh source .venv/bin/activate
tito system health # Verify environment tito system health # Verify environment
``` ```

View File

@@ -15,8 +15,8 @@
**First step for ANY issue**: **First step for ANY issue**:
```bash ```bash
cd TinyTorch cd tinytorch
source activate.sh source .venv/bin/activate
tito system health tito system health
``` ```
@@ -51,11 +51,11 @@ $ tito module start 01
**Solution**: **Solution**:
```bash ```bash
# 1. Activate environment # 1. Activate environment
cd TinyTorch cd tinytorch
source activate.sh source .venv/bin/activate
# 2. Verify activation # 2. Verify activation
which python # Should show TinyTorch/venv/bin/python which python # Should show tinytorch/.venv/bin/python
# 3. Re-install TinyTorch in development mode # 3. Re-install TinyTorch in development mode
pip install -e . pip install -e .
@@ -64,7 +64,7 @@ pip install -e .
tito --help tito --help
``` ```
**Prevention**: Always run `source activate.sh` before working. **Prevention**: Always run `source .venv/bin/activate` before working.
</div> </div>
@@ -83,10 +83,10 @@ ModuleNotFoundError: No module named 'tinytorch'
**Solution**: **Solution**:
```bash ```bash
# 1. Verify you're in the right directory # 1. Verify you're in the right directory
pwd # Should end with /TinyTorch pwd # Should end with /tinytorch
# 2. Activate environment # 2. Activate environment
source activate.sh source .venv/bin/activate
# 3. Install in development mode # 3. Install in development mode
pip install -e . pip install -e .
@@ -109,7 +109,7 @@ python -c "import tinytorch; print(tinytorch.__file__)"
**Symptom**: **Symptom**:
```bash ```bash
$ source activate.sh $ source .venv/bin/activate
# No (venv) prefix appears, or wrong Python version # No (venv) prefix appears, or wrong Python version
``` ```
@@ -118,17 +118,17 @@ $ source activate.sh
**Solution**: **Solution**:
```bash ```bash
# 1. Remove old virtual environment # 1. Remove old virtual environment
rm -rf venv/ rm -rf .venv/
# 2. Re-run setup # 2. Re-run setup
./setup-environment.sh tito setup
# 3. Activate # 3. Activate
source activate.sh source .venv/bin/activate
# 4. Verify # 4. Verify
python --version # Should be 3.8+ python --version # Should be 3.8+
which pip # Should show TinyTorch/venv/bin/pip which pip # Should show tinytorch/.venv/bin/pip
``` ```
**Expected**: `(venv)` prefix appears in terminal prompt. **Expected**: `(venv)` prefix appears in terminal prompt.
@@ -224,7 +224,7 @@ tito system update
**Step 1: Check environment**: **Step 1: Check environment**:
```bash ```bash
source activate.sh source .venv/bin/activate
tito system health tito system health
``` ```
@@ -772,7 +772,7 @@ ImportError: No module named 'numpy'
**Solution**: **Solution**:
```bash ```bash
# Activate environment # Activate environment
source activate.sh source .venv/bin/activate
# Install dependencies # Install dependencies
pip install numpy jupyter jupyterlab jupytext rich pip install numpy jupyter jupyterlab jupytext rich
@@ -877,14 +877,14 @@ top
**Symptom**: **Symptom**:
```bash ```bash
$ ./setup-environment.sh $ tito setup
Permission denied Permission denied
``` ```
**Solution**: **Solution**:
```bash ```bash
chmod +x setup-environment.sh activate.sh pip install -e .
./setup-environment.sh tito setup
``` ```
</div> </div>
@@ -920,11 +920,11 @@ tito setup
</div> </div>
### Windows: "activate.sh not working" ### Windows: Virtual Environment Activation
<div style="background: #fff5f5; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #e74c3c; margin: 1.5rem 0;"> <div style="background: #fff5f5; padding: 1.5rem; border-radius: 0.5rem; border-left: 4px solid #e74c3c; margin: 1.5rem 0;">
**Solution**: Use the correct activation path for Git Bash on Windows: **Solution**: Use the correct activation path for your shell on Windows:
```bash ```bash
# Git Bash (recommended) # Git Bash (recommended)
source .venv/Scripts/activate source .venv/Scripts/activate
@@ -950,7 +950,7 @@ source .venv/Scripts/activate
**Solution**: Specify Python 3.8+ explicitly: **Solution**: Specify Python 3.8+ explicitly:
```bash ```bash
python3.8 -m venv venv python3.8 -m venv venv
source activate.sh source .venv/bin/activate
python --version # Verify python --version # Verify
``` ```
@@ -1017,7 +1017,7 @@ python -c "from tinytorch import Tensor" 2>&1 | less
1. **Always activate environment first**: 1. **Always activate environment first**:
```bash ```bash
source activate.sh source .venv/bin/activate
``` ```
2. **Run `tito system health` regularly**: 2. **Run `tito system health` regularly**:
@@ -1053,13 +1053,13 @@ python -c "from tinytorch import Tensor" 2>&1 | less
| Error Message | Quick Fix | | Error Message | Quick Fix |
|--------------|-----------| |--------------|-----------|
| `tito: command not found` | `source activate.sh` | | `tito: command not found` | `source .venv/bin/activate` |
| `ModuleNotFoundError: tinytorch` | `pip install -e .` | | `ModuleNotFoundError: tinytorch` | `pip install -e .` |
| `SyntaxError` in export | Fix Python syntax, test in Jupyter first | | `SyntaxError` in export | Fix Python syntax, test in Jupyter first |
| `ImportError` in milestone | Re-export required modules | | `ImportError` in milestone | Re-export required modules |
| `.tito/progress.json not found` | `tito system health` to recreate | | `.tito/progress.json not found` | `tito system health` to recreate |
| `Jupyter Lab won't start` | `pkill -f jupyter && tito module start XX` | | `Jupyter Lab won't start` | `pkill -f jupyter && tito module start XX` |
| `Permission denied` | `chmod +x setup-environment.sh activate.sh` | | `Permission denied` | `pip install -e .` then `tito setup` |
| `Tests fail` during export | Debug in Jupyter, check test assertions | | `Tests fail` during export | Debug in Jupyter, check test assertions |
| `Prerequisites not met` | `tito milestone info XX` to see requirements | | `Prerequisites not met` | `tito milestone info XX` to see requirements |