TorchX is a Python SDK and set of components for building and launching distributed PyTorch applications. It provides a unified API to run jobs across different schedulers (local, Slurm, Kubernetes, AWS Batch, etc.). Version 2026.4.30 is a nightly release. Release cadence is nightly (torchx-nightly) vs stable (torchx) using semver.
pip install torchx-nightlyVerified import paths — ran on the pinned version, not inferred.
Create a simple AppDef and schedule it using the local (current working directory) scheduler.
Use `from torchx.runner import run` instead.
Use `from torchx.schedulers import get_scheduler_factories`.
Use a virtual environment and install only one: either `torchx` (stable) or `torchx-nightly` (unstable).
Install PyTorch separately via `pip install torch` (or the appropriate variant for your system).
Define roles explicitly using `Role` objects and pass them to `AppDef(roles=[...])`.
Use absolute paths or set `workspace` in the TorchX config.
Install extra dependencies: `pip install torchx[kubernetes]` or `torchx[slurm]`, etc.