Files
TinyTorch/pyproject.toml
T
Vijay Janapa Reddi d3a126235c Restructure: Separate developer source (src/) from learner notebooks (modules/)
Major directory restructure to support both developer and learner workflows:

Structure Changes:
- NEW: src/ directory for Python source files (version controlled)
  - Files renamed: tensor.py → 01_tensor.py (matches directory naming)
  - All 20 modules moved from modules/ to src/
- CHANGED: modules/ now holds generated notebooks (gitignored)
  - Generated from src/*.py using jupytext
  - Learners work in notebooks, developers work in Python source
- UNCHANGED: tinytorch/ package (still auto-generated from notebooks)

Workflow: src/*.py → modules/*.ipynb → tinytorch/*.py

Command Updates:
- Updated export command to read from src/ and generate to modules/
- Export flow: discovers modules in src/, converts to notebooks in modules/, exports to tinytorch/
- All 20 modules tested and working

Configuration:
- Updated .gitignore to ignore modules/ directory
- Updated README.md with new three-layer architecture explanation
- Updated export.py source mappings and paths

Benefits:
- Clean separation: developers edit Python, learners use notebooks
- Better version control: only Python source committed, notebooks generated
- Flexible learning: can work in notebooks OR Python source
- Maintains backward compatibility: tinytorch package unchanged

Tested:
- Single module export: tito export 01_tensor 
- All modules export: tito export --all 
- Package imports: from tinytorch.core.tensor import Tensor 
- 20/20 modules successfully converted and exported
2025-11-25 00:02:21 -05:00

60 lines
1.6 KiB
TOML

[build-system]
requires = ["setuptools>=64.0"]
build-backend = "setuptools.build_meta"
[project]
name="tinytorch"
version = "0.1.0"
description = "Build ML Systems from Scratch - Educational Deep Learning Framework"
readme = "README.md"
requires-python=">=3.8"
authors = [
{name = "Vijay Janapa Reddi", email = "vj@eecs.harvard.edu"}
]
license = {text = "MIT"}
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Education",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Education",
]
dependencies = [
"numpy>=1.24.0,<3.0.0",
"rich>=13.0.0",
"PyYAML>=6.0",
]
[project.scripts]
tito = "tito.main:main"
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-cov>=4.0.0",
"jupytext>=1.16.0",
"nbformat>=5.10.0",
"jupyter>=1.1.0",
"jupyterlab>=4.2.0",
]
visualization = [
"matplotlib>=3.9.0", # For plotting in Modules 17, 19, 20
]
[project.urls]
Homepage = "https://github.com/mlsysbook/TinyTorch"
Repository = "https://github.com/mlsysbook/TinyTorch"
Documentation = "https://mlsysbook.github.io/TinyTorch/"
Issues = "https://github.com/mlsysbook/TinyTorch/issues"
[tool.setuptools.packages.find]
where = ["."]
include = ["tinytorch*", "tito*"]
exclude = ["tests*", "modules*", "site*", "docs*", "milestones*", "assignments*"]