Files
TinyTorch/binder
Vijay Janapa Reddi 1517c6f83d Clean up repository by removing planning and status documents
Removed 42 planning, brainstorming, and status tracking documents that served their purpose during development but are no longer needed for release.

Changes:
- Root: Removed 4 temporary/status files
- binder/: Removed 20 planning documents (kept essential setup files)
- docs/: Removed 16 planning/status documents (preserved all user-facing docs and website dependencies)
- tests/: Removed 2 status documents (preserved all test docs and milestone system)

Preserved files:
- All user-facing documentation (README, guides, quickstarts)
- All website dependencies (INSTRUCTOR_GUIDE, PRIVACY_DATA_RETENTION, TEAM_ONBOARDING)
- All functional configuration files
- All milestone system documentation (7 files in tests/milestones/)

Updated .gitignore to prevent future accumulation of internal development files (.claude/, site/_build/, log files, progress.json)
2025-11-22 21:05:57 -05:00
..

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 environment
  • postBuild: 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:

  1. Binder reads binder/requirements.txt to install Python dependencies
  2. Binder runs binder/postBuild to install the TinyTorch package (pip install -e .)
  3. 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:

  1. Clone the repository
  2. Install dependencies from binder/requirements.txt
  3. 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:

  1. Test Binder Build:

    # Visit: https://mybinder.org/v2/gh/mlsysbook/TinyTorch/main
    # Or use the badge:
    [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/mlsysbook/TinyTorch/main)
    
  2. Verify Installation: Once Binder launches, test in a notebook:

    import tinytorch
    print(tinytorch.__version__)
    
  3. Check Available Resources:

    import os
    print("Modules:", os.listdir("modules"))
    print("Assignments:", os.listdir("assignments"))
    print("Milestones:", os.listdir("milestones"))
    

Troubleshooting

Binder Build Fails

Colab Import Errors

  • Ensure binder/requirements.txt includes 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 postBuild script runs pip install -e . correctly
  • Check that pyproject.toml is in the repository root
  • Ensure all dependencies in requirements.txt are compatible

Deployment Environments

As documented in the TinyTorch paper, three deployment environments are supported:

  1. JupyterHub (institutional server)

    • 8-core/32GB supports ~50 students
    • Best for classroom use
  2. Google Colab (zero installation)

    • Best for MOOCs and self-paced learning
    • No setup required from students
  3. Local Installation (pip install tinytorch)

    • Best for self-paced learning and development
    • Full control over environment

Keeping Dependencies Updated

When updating dependencies:

  1. Update requirements.txt (root) - for local development
  2. Update binder/requirements.txt - for Binder/Colab
  3. Update site/requirements.txt - for documentation builds
  4. Keep versions synchronized where possible

References