Contributing
TrenTorch is an educational framework: every contribution should make a concept clearer, preserve the learning progression, or make the systems-thinking angle (memory, performance, scaling) sharper, without adding production complexity that doesn't teach anything.
Setting up a dev environment
# macOS / Linux
git clone https://github.com/TrenTorch/TrenTorch.git
cd TrenTorch
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
tren --version
tren system health
# Windows (PowerShell)
git clone https://github.com/TrenTorch/TrenTorch.git
cd TrenTorch
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
pip install -e .
tren --version
tren system health
See Getting Started for the full walkthrough if you're new to the CLI itself.
Where things live
- Curriculum content:
data/src/NN_name/NN_name.py. This is what a module actually teaches; edit here, not in a generated notebook. - Milestone scripts:
data/milestones/ - The CLI:
platforms/cli/(cli_platform/for setup and dev/CI tooling,processes/for the student-facing workflow) - Tests: module-level tests sit next to their module (
data/src/NN_name/tests/); cross-module and CLI tests live undertests/andplatforms/cli/tests/
Before you push
tren dev test --unit # fast: your module's own tests
tren dev test --integration # cross-module checks
tren dev preflight --full # broader pre-release verification
The full CI suite (.github/workflows/validate.yml) runs all of this and more on every push; see Architecture for what each stage checks. It's fast (well under 4 minutes end to end as of the last optimization pass), so there's little reason not to let it run rather than trying to fully replicate it locally.
Types of contributions
- Module fixes: bugs in an implementation, clearer explanations, better examples
- Testing: edge cases, checkpoint validation, fixing a flaky test
- Documentation: clearer module write-ups, better systems-insight sections
- CI/tooling: the CLI itself, the pipeline, dev scripts
A note on scope
This is a solo/small-team fork with its own conventions (see docs/design.md for what was deliberately removed from upstream: no grading pipeline, no multi-cloud notebook targets, no community backend). If you're used to the upstream TinyTorch project's contribution process, check docs/CONTRIBUTING.md and docs/design.md in this repo first, some of it has diverged.
Questions
Open an issue, or check docs/; most "how does X actually work" questions are already answered there in more depth than fits here.