mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-03-12 02:06:14 -05:00
Merge dev: TITO doc fixes and version badge
This commit is contained in:
@@ -49,9 +49,9 @@ graph LR
|
||||
<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;">
|
||||
<li>Perceptron (1958)</li>
|
||||
<li>XOR Crisis (1969)</li>
|
||||
<li>MLP Revival (1986)</li>
|
||||
<li>CNN Revolution (1998)</li>
|
||||
<li>AlexNet Era (2012)</li>
|
||||
<li>Transformer Era (2017)</li>
|
||||
<li>MLPerf (2018)</li>
|
||||
</ul>
|
||||
@@ -170,7 +170,7 @@ Module Progress:
|
||||
07 Optimizers
|
||||
08 Training
|
||||
09 Convolutions
|
||||
10 Normalization
|
||||
10 Tokenization
|
||||
...
|
||||
|
||||
Milestone Achievements:
|
||||
|
||||
@@ -261,6 +261,7 @@ tito milestone run 03
|
||||
Module 05 - complete
|
||||
Module 06 - complete
|
||||
Module 07 - complete
|
||||
Module 08 - complete
|
||||
|
||||
All prerequisites met!
|
||||
```
|
||||
@@ -282,13 +283,13 @@ You'll see a helpful error:
|
||||
```bash
|
||||
Missing Required Modules
|
||||
|
||||
Milestone 03 requires modules: 01, 02, 03, 04, 05, 06, 07
|
||||
Missing: 05, 06, 07
|
||||
Milestone 03 requires modules: 01, 02, 03, 04, 05, 06, 07, 08
|
||||
Missing: 06, 07, 08
|
||||
|
||||
Complete the missing modules first:
|
||||
tito module start 05
|
||||
tito module start 06
|
||||
tito module start 07
|
||||
tito module start 08
|
||||
```
|
||||
|
||||
## Achievement Celebration
|
||||
@@ -315,7 +316,7 @@ Achievement saved to your progress!
|
||||
|
||||
What's Next:
|
||||
Milestone 04: CNN Revolution (1998)
|
||||
Unlock by completing modules: 08, 09
|
||||
Unlock by completing module: 09
|
||||
```
|
||||
|
||||
## Understanding Your Progress
|
||||
|
||||
@@ -77,8 +77,8 @@ Here's what a complete session looks like:
|
||||
|
||||
**1. Start Session**
|
||||
```bash
|
||||
cd TinyTorch
|
||||
source activate.sh
|
||||
cd tinytorch
|
||||
source .venv/bin/activate
|
||||
tito system health # Verify environment
|
||||
```
|
||||
|
||||
@@ -182,6 +182,18 @@ Convenience command to launch Jupyter Lab from the correct directory.
|
||||
|
||||
## 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)
|
||||
|
||||
<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>
|
||||
|
||||
### 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)
|
||||
|
||||
<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>
|
||||
|
||||
### 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
|
||||
|
||||
<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**:
|
||||
```bash
|
||||
# Re-run setup
|
||||
./setup-environment.sh
|
||||
source activate.sh
|
||||
# Re-activate environment
|
||||
cd tinytorch
|
||||
source .venv/bin/activate
|
||||
|
||||
# Re-run setup if needed
|
||||
tito setup
|
||||
|
||||
# Verify
|
||||
tito system health
|
||||
|
||||
@@ -70,6 +70,9 @@ tito module status
|
||||
|
||||
**Your Workflow:**
|
||||
```bash
|
||||
# Initialize nbgrader environment
|
||||
tito nbgrader init
|
||||
|
||||
# Generate assignments
|
||||
tito nbgrader generate 01
|
||||
|
||||
@@ -82,6 +85,11 @@ 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:**
|
||||
@@ -124,6 +132,14 @@ tito dev test --all
|
||||
|
||||
## 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
|
||||
|
||||
**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 info` | System resources (paths, disk, memory) | [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
|
||||
|
||||
@@ -140,9 +158,12 @@ tito dev test --all
|
||||
|
||||
| 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 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 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 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 status` | View milestone progress and achievements | [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
|
||||
|
||||
@@ -194,10 +217,10 @@ tito dev test --all
|
||||
|
||||
| Command | Description | Guide |
|
||||
|---------|-------------|-------|
|
||||
| `tito benchmark baseline` | Quick setup validation ("Hello World") | [Community Guide](../community.md) |
|
||||
| `tito benchmark capstone` | Full Module 20 performance evaluation | [Community Guide](../community.md) |
|
||||
| `tito benchmark baseline` | Quick setup validation ("Hello World") | [Troubleshooting](troubleshooting.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
|
||||
|
||||
@@ -235,11 +258,13 @@ tinytorch/ ← Package code (auto-generated)
|
||||
### First-Time Setup
|
||||
|
||||
```bash
|
||||
# Clone and setup
|
||||
git clone https://github.com/harvard-edge/cs249r_book.git
|
||||
cd TinyTorch
|
||||
./setup-environment.sh
|
||||
source activate.sh
|
||||
# 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
|
||||
@@ -312,8 +337,8 @@ Here's what a typical TinyTorch session looks like:
|
||||
|
||||
**1. Start Session**
|
||||
```bash
|
||||
cd TinyTorch
|
||||
source activate.sh
|
||||
cd tinytorch
|
||||
source .venv/bin/activate
|
||||
tito system health # Verify environment
|
||||
```
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
**First step for ANY issue**:
|
||||
|
||||
```bash
|
||||
cd TinyTorch
|
||||
source activate.sh
|
||||
cd tinytorch
|
||||
source .venv/bin/activate
|
||||
tito system health
|
||||
```
|
||||
|
||||
@@ -51,11 +51,11 @@ $ tito module start 01
|
||||
**Solution**:
|
||||
```bash
|
||||
# 1. Activate environment
|
||||
cd TinyTorch
|
||||
source activate.sh
|
||||
cd tinytorch
|
||||
source .venv/bin/activate
|
||||
|
||||
# 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
|
||||
pip install -e .
|
||||
@@ -64,7 +64,7 @@ pip install -e .
|
||||
tito --help
|
||||
```
|
||||
|
||||
**Prevention**: Always run `source activate.sh` before working.
|
||||
**Prevention**: Always run `source .venv/bin/activate` before working.
|
||||
|
||||
</div>
|
||||
|
||||
@@ -83,10 +83,10 @@ ModuleNotFoundError: No module named 'tinytorch'
|
||||
**Solution**:
|
||||
```bash
|
||||
# 1. Verify you're in the right directory
|
||||
pwd # Should end with /TinyTorch
|
||||
pwd # Should end with /tinytorch
|
||||
|
||||
# 2. Activate environment
|
||||
source activate.sh
|
||||
source .venv/bin/activate
|
||||
|
||||
# 3. Install in development mode
|
||||
pip install -e .
|
||||
@@ -109,7 +109,7 @@ python -c "import tinytorch; print(tinytorch.__file__)"
|
||||
|
||||
**Symptom**:
|
||||
```bash
|
||||
$ source activate.sh
|
||||
$ source .venv/bin/activate
|
||||
# No (venv) prefix appears, or wrong Python version
|
||||
```
|
||||
|
||||
@@ -118,17 +118,17 @@ $ source activate.sh
|
||||
**Solution**:
|
||||
```bash
|
||||
# 1. Remove old virtual environment
|
||||
rm -rf venv/
|
||||
rm -rf .venv/
|
||||
|
||||
# 2. Re-run setup
|
||||
./setup-environment.sh
|
||||
tito setup
|
||||
|
||||
# 3. Activate
|
||||
source activate.sh
|
||||
source .venv/bin/activate
|
||||
|
||||
# 4. Verify
|
||||
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.
|
||||
@@ -224,7 +224,7 @@ tito system update
|
||||
|
||||
**Step 1: Check environment**:
|
||||
```bash
|
||||
source activate.sh
|
||||
source .venv/bin/activate
|
||||
tito system health
|
||||
```
|
||||
|
||||
@@ -772,7 +772,7 @@ ImportError: No module named 'numpy'
|
||||
**Solution**:
|
||||
```bash
|
||||
# Activate environment
|
||||
source activate.sh
|
||||
source .venv/bin/activate
|
||||
|
||||
# Install dependencies
|
||||
pip install numpy jupyter jupyterlab jupytext rich
|
||||
@@ -877,14 +877,14 @@ top
|
||||
|
||||
**Symptom**:
|
||||
```bash
|
||||
$ ./setup-environment.sh
|
||||
$ tito setup
|
||||
Permission denied
|
||||
```
|
||||
|
||||
**Solution**:
|
||||
```bash
|
||||
chmod +x setup-environment.sh activate.sh
|
||||
./setup-environment.sh
|
||||
pip install -e .
|
||||
tito setup
|
||||
```
|
||||
|
||||
</div>
|
||||
@@ -920,11 +920,11 @@ tito setup
|
||||
|
||||
</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;">
|
||||
|
||||
**Solution**: Use the correct activation path for Git Bash on Windows:
|
||||
**Solution**: Use the correct activation path for your shell on Windows:
|
||||
```bash
|
||||
# Git Bash (recommended)
|
||||
source .venv/Scripts/activate
|
||||
@@ -950,7 +950,7 @@ source .venv/Scripts/activate
|
||||
**Solution**: Specify Python 3.8+ explicitly:
|
||||
```bash
|
||||
python3.8 -m venv venv
|
||||
source activate.sh
|
||||
source .venv/bin/activate
|
||||
python --version # Verify
|
||||
```
|
||||
|
||||
@@ -1017,7 +1017,7 @@ python -c "from tinytorch import Tensor" 2>&1 | less
|
||||
|
||||
1. **Always activate environment first**:
|
||||
```bash
|
||||
source activate.sh
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
2. **Run `tito system health` regularly**:
|
||||
@@ -1053,13 +1053,13 @@ python -c "from tinytorch import Tensor" 2>&1 | less
|
||||
|
||||
| Error Message | Quick Fix |
|
||||
|--------------|-----------|
|
||||
| `tito: command not found` | `source activate.sh` |
|
||||
| `tito: command not found` | `source .venv/bin/activate` |
|
||||
| `ModuleNotFoundError: tinytorch` | `pip install -e .` |
|
||||
| `SyntaxError` in export | Fix Python syntax, test in Jupyter first |
|
||||
| `ImportError` in milestone | Re-export required modules |
|
||||
| `.tito/progress.json not found` | `tito system health` to recreate |
|
||||
| `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 |
|
||||
| `Prerequisites not met` | `tito milestone info XX` to see requirements |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user