Commit Graph

14 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
3a2b1bf482 fix(ci): use head_ref for PR branch in fresh install test
On PR events, github.ref_name resolves to the merge ref (e.g.
"1159/merge") which doesn't exist on raw.githubusercontent.com,
causing a 404. Use github.head_ref (the actual source branch)
for PRs, falling back to ref_name for push events.

Also adds -f flag to curl so HTTP errors fail immediately with
a clear message instead of silently saving the 404 HTML page.
2026-02-04 10:06:25 -05:00
Vijay Janapa Reddi
19093cec1b fix(ci): use pipe delimiter in sed to handle branch names with slashes
The fresh install test script used / as the sed delimiter when
substituting the branch name, which breaks on any branch containing /
(e.g. feature/foo, fix/bar, or GitHub merge refs like 1156/merge).
2026-02-04 09:00:20 -05:00
Vijay Janapa Reddi
e7bdbe9e58 fix: integrate fresh install test into CI pipeline
- Add TINYTORCH_NON_INTERACTIVE env var to install.sh for CI/scripted usage
- Skip interactive prompts when no TTY available or non-interactive mode set
- Add Stage 7 (Fresh Install) to tinytorch-ci.yml
- Remove separate tinytorch-install-test.yml workflow
- Fresh install now gates PRs/merges like other tests
2026-01-25 10:51:04 -05:00
Vijay Janapa Reddi
eea7f690dc feat(tinytorch): single source of truth for version management
- install.sh now fetches version from GitHub tags API instead of hardcoding
- README.md badge uses dynamic shields.io GitHub tag filter
- Add release.sh script for version bumping and tagging workflow

Version is now managed solely in pyproject.toml. Other files read it at
runtime or via GitHub API, eliminating version drift across files.
2026-01-23 14:48:55 -05:00
Vijay Janapa Reddi
906e344ad4 feat(ci): comprehensive CI/CD testing infrastructure
- Rewrite tinytorch-ci.yml with parallel test jobs for each test type
- Add configure job that dynamically selects tests based on trigger:
  * Push to dev: quick (unit + cli)
  * Push to main: standard (unit + cli + integration + e2e)
  * PR: standard tests
  * workflow_call: all tests (pre-release gate)
  * Manual: any selected type
- Add summary job with detailed results table
- Fix publish workflow preflight_level → test_type input mismatch
- Add fresh-install-test.yml workflow for student experience simulation
- Add test-fresh-install.sh script (Docker-based clean environment test)

Test hierarchy from fast to comprehensive:
1. Unit + CLI (~1 min) - Fast feedback
2. Integration (~2 min) - Cross-module validation
3. E2E (~3 min) - User journey validation
4. Inline (~10 min) - Progressive module build from src/
5. Milestone (~5 min) - Historical ML recreations
6. Release (~20 min) - Destructive full validation
2026-01-23 13:47:32 -05:00
Vijay Janapa Reddi
c7cf3f04e8 refactor(tinytorch): consolidate install script to single location
- Move install script to site/extra/install (served at /install URL)
- Remove duplicate scripts from scripts/ and _static/install/
- Add comprehensive documentation header to install script
- Document what files are kept vs removed for students
- Update getting-started.md to reflect idempotent tito setup

Students get: src/, tinytorch/, tito/, milestones/, tests/, datasets/,
bin/, modules/, requirements.txt, pyproject.toml, settings.ini

Removed: paper/, instructor/, site/, scripts/, tools/, binder/, etc/,
assignments/, benchmark_results/, IDE configs, dev scripts

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-15 13:36:30 -05:00
Vijay Janapa Reddi
853eb03ee8 style: apply consistent whitespace and formatting across codebase 2025-12-13 14:05:34 -05:00
Vijay Janapa Reddi
125dd5f636 fix: correct module workflow export and milestone prerequisites
- Fix notebook path mismatch in SrcCommand._handle_export
  (was looking for 01_tensor.ipynb but actual file is tensor.ipynb)

- Update install.sh to preserve needed files for student workflow:
  - Keep settings.ini (required for nbdev_export)
  - Keep milestones/ (required for tito milestone run)
  - Clear tinytorch/core/*.py (students rebuild via exports)
  - Clear progress.json (students start fresh)

- Fix milestone module requirements to match actual script imports:
  - Milestone 01: [1,2,3] (Tensor, Activations, Layers)
  - Milestone 02: [1,2,3,4,5,6] (+ Losses, Autograd, Optimizers)
  - Milestone 03: [1,2,3,4,5,6,8] (+ DataLoader)
  - Milestone 04: [1,2,3,4,5,6,8,9] (+ Spatial)
  - Milestone 05: [1,2,3,4,5,6,11,12,13] (+ Embeddings, Attention, Transformers)

- Fix progress file path: read from progress.json not .tito/progress.json

- Fix module number comparison: convert string IDs to integers

- Update health check to validate modules_dir (src/) not assignments_dir

- Rename 'milestones' command to 'milestone' (singular)

- Fix test files to check correct directories for student install
2025-12-11 17:22:15 -08:00
Vijay Janapa Reddi
e88ce2f041 feat(install): add safety checks and clean distribution
- Add check_not_in_venv() to warn if already in virtual environment
- Add check_internet() to verify GitHub reachable before clone
- Show source repository and branch during install confirmation
- Capture and display commit hash for provenance
- Clean dev-only files after download (paper, instructor, scripts, etc.)
- Clear modules/ subdirectories for fresh start
2025-12-11 13:31:30 -08:00
Vijay Janapa Reddi
ddf651970f refactor(tito): remove doctor alias, use health as single command
Remove the doctor/health alias duplication in favor of a single
'tito system health' command for environment validation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2025-12-11 12:34:28 -08:00
Vijay Janapa Reddi
929a729a44 fix(tito): resolve environment validation errors and simplify installer
- Remove bogus tinytorch_dir check from config validation (directory does not exist)
- Fix setup.py to check import tito instead of non-existent import tinytorch
- Simplify install.sh: remove location restrictions, add spinner progress
- Update success message to direct users to tito module start 01

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-11 12:05:07 -08:00
Vijay Janapa Reddi
daa3e25308 feat(installer): add safe one-line installer with tito update support
- Add install.sh with safety checks (location, prerequisites, confirmation)
- Block dangerous locations (/, /tmp, system dirs), warn on Downloads/home
- Show progress during download and installation steps
- Update tito update command to work without git (re-downloads, preserves modules/)
- Update README and getting-started docs with new curl install method
- Add install.sh to site static files for tinytorch.ai/install redirect

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 11:10:07 -08:00
Vijay Janapa Reddi
b1fea14980 feat: add curl-based install system with tito update command
- Add install.sh script using git sparse checkout for minimal downloads
- Add tito update command to check for and install updates
- Add install command box to homepage with copy button
- Unify ASCII logo between install script and tito CLI
- Add flame emoji to tagline and tighten letter spacing
- Remove unused fix-venv and rebuild-site scripts
2025-12-10 10:57:27 -08:00
Vijay Janapa Reddi
c602f97364 feat: integrate TinyTorch into MLSysBook repository
TinyTorch educational deep learning framework now lives at tinytorch/

Structure:
- tinytorch/src/         - Source modules (single source of truth)
- tinytorch/tito/        - CLI tool
- tinytorch/tests/       - Test suite
- tinytorch/site/        - Jupyter Book website
- tinytorch/milestones/  - Historical ML implementations
- tinytorch/datasets/    - Educational datasets (tinydigits, tinytalks)
- tinytorch/assignments/ - NBGrader assignments
- tinytorch/instructor/  - Teaching materials

Workflows (with tinytorch- prefix):
- tinytorch-ci.yml           - CI/CD pipeline
- tinytorch-publish-dev.yml  - Dev site deployment
- tinytorch-publish-live.yml - Live site deployment
- tinytorch-build-pdf.yml    - PDF generation
- tinytorch-release-check.yml - Release validation

Repository Variables added:
- TINYTORCH_ROOT  = tinytorch
- TINYTORCH_SRC   = tinytorch/src
- TINYTORCH_SITE  = tinytorch/site
- TINYTORCH_TESTS = tinytorch/tests

All workflows use \${{ vars.TINYTORCH_* }} for path configuration.

Note: tinytorch/site/_static/favicon.svg kept as SVG (valid for favicons)
2025-12-05 19:23:18 -08:00