mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-03-09 10:12:08 -05:00
- Implement tito benchmark baseline and capstone commands - Add SPEC-style normalization for baseline benchmarks - Implement tito community join, update, leave, stats, profile commands - Use project-local storage (.tinytorch/) for user data - Add privacy-by-design with explicit consent prompts - Update site documentation for community and benchmark features - Add Marimo integration for online notebooks - Clean up redundant milestone setup exploration docs - Finalize baseline design: fast setup validation (~1 second) with normalized results
Binder Environment Setup
This directory contains configuration files for running TinyTorch in cloud environments via Binder and Google Colab.
Files
requirements.txt: Python dependencies for the Binder environmentpostBuild: Script that runs after environment setup to install TinyTorch
How It Works
Binder
When users click the "Launch Binder" button on any notebook page in the TinyTorch documentation:
- Binder reads
binder/requirements.txtto install Python dependencies - Binder runs
binder/postBuildto install the TinyTorch package (pip install -e .) - Users get a fully configured JupyterLab environment with TinyTorch ready to use
Binder URL Format:
https://mybinder.org/v2/gh/mlsysbook/TinyTorch/main
Google Colab
Colab launch buttons automatically:
- Clone the repository
- Install dependencies from
binder/requirements.txt - Run setup commands (users may need to manually run
pip install -e .)
Colab URL Format:
https://colab.research.google.com/github/mlsysbook/TinyTorch/blob/main/path/to/notebook.ipynb
Testing
To test your Binder setup:
-
Test Binder Build:
# Visit: https://mybinder.org/v2/gh/mlsysbook/TinyTorch/main # Or use the badge: [](https://mybinder.org/v2/gh/mlsysbook/TinyTorch/main) -
Verify Installation: Once Binder launches, test in a notebook:
import tinytorch print(tinytorch.__version__) -
Check Available Resources:
import os print("Modules:", os.listdir("modules")) print("Assignments:", os.listdir("assignments")) print("Milestones:", os.listdir("milestones"))
Troubleshooting
Binder Build Fails
- Check
binder/requirements.txtfor syntax errors - Verify
binder/postBuildhas execute permissions (chmod +x binder/postBuild) - Review Binder build logs at: https://mybinder.org/v2/gh/mlsysbook/TinyTorch/main?urlpath=lab/tree/logs%2Fbuild.log
Colab Import Errors
- Ensure
binder/requirements.txtincludes all dependencies - Users may need to run:
!pip install -e .in a Colab cell - Check that the repository is public (Colab can't access private repos)
Package Not Found
- Verify
postBuildscript runspip install -e .correctly - Check that
pyproject.tomlis in the repository root - Ensure all dependencies in
requirements.txtare compatible
Deployment Environments
As documented in the TinyTorch paper, three deployment environments are supported:
-
JupyterHub (institutional server)
- 8-core/32GB supports ~50 students
- Best for classroom use
-
Google Colab (zero installation)
- Best for MOOCs and self-paced learning
- No setup required from students
-
Local Installation (
pip install tinytorch)- Best for self-paced learning and development
- Full control over environment
Keeping Dependencies Updated
When updating dependencies:
- Update
requirements.txt(root) - for local development - Update
binder/requirements.txt- for Binder/Colab - Update
site/requirements.txt- for documentation builds - Keep versions synchronized where possible