torchx
TorchX SDK and Components
What it is and what it does
TorchX is a job launcher that abstracts away scheduler differences, letting you write PyTorch training code once and deploy it to Kubernetes, Slurm, AWS Batch, Docker, or local machines without rewriting. It's built for both rapid iteration during research and production ML pipeline orchestration. The package provides a Python SDK and CLI interface, with nine runtime dependencies including docker, pyyaml, fsspec, and tabulate for configuration, container management, and output formatting.
The project is actively maintained by the PyTorch team, supports Python 3.7+, and comes with optional extras for specialized schedulers (Kubernetes, Ray, GCP Batch, Kubeflow Pipelines). It's positioned as a bridge between local development and production deployment, reducing friction when moving workloads across different compute environments.
Use it for:
- Submit PyTorch training jobs to Kubernetes clusters without learning cluster-specific deployment syntax.
- Run the same training script on Slurm HPC systems, AWS Batch, or local Docker without code changes.
- Build end-to-end ML pipelines that orchestrate multiple training and preprocessing steps across schedulers.
- Rapidly iterate on model training locally, then scale to production Kubernetes without rewriting job definitions.
- Manage distributed training across multiple machines using a unified CLI and Python API.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
TorchX is a universal job launcher that submits PyTorch training and ML pipeline workloads to multiple schedulers including Kubernetes, Slurm, AWS Batch, Docker, and local execution.
Yes, if you need to run PyTorch workloads across multiple schedulers or want to unify job submission across development and production environments. The active maintenance, permissive license, low install friction, and zero known vulnerabilities make it safe to adopt. Install with caution if you rely on Ray or GCP Batch support, which are marked as prototype; for stable schedulers (Kubernetes, Slurm, AWS Batch, Docker, Local), it's a solid choice.
Install
torchx on PyPI
pip
pip install torchxuv
uv add torchxpoetry
poetry add torchxInstalling torchx
Before you install
Low install friction with a pure-Python wheel and nine runtime dependencies. Active maintenance with recent commits; last release was over a year ago but the repository remains actively developed.
License in practice
BSD-3 permissive license means you can use, modify, and distribute TorchX with minimal restrictions in both open-source and commercial projects.
Quickstart
pip install torchx
import torchx
from torchx.specs import python_app
app = python_app(name="my_job", image="pytorch:latest")
Requires Python 3.7+; PyTorch must be installed separately; scheduler-specific requirements vary (e.g., Docker for docker-based schedulers, kubectl for Kubernetes).
Verify before relying
- Whether the package actively supports all listed schedulers (Kubernetes, Slurm, AWS Batch, Docker, Local, Ray, GCP Batch) or if some are in prototype/limited status.
- Current state of Ray and GCP Batch support, which are marked as prototype in the description.
- Whether optional dependencies (kfp, kubernetes, ray, gcp_batch) are automatically installed or require explicit extras.
Package facts
| License | BSD-3 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — pyre-extensions, docstring-parser, importlib-metadata, pyyaml, docker, filelock, fsspec, urllib3, tabulate |
| Maintenance | actively maintained — 759 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 251,355/month — #8,586 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: torchx-0.7.0-py3-none-any.whl
Keywords: pytorch, machine learning
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
torchft-nightlyProvides per-step fault tolerance for PyTorch…
unclear · top 15,000 on PyPI
gen-workerA Python SDK for writing serverless endpoints…
permissive · top 15,000 on PyPI
metaflow-torchrunProvides a Metaflow decorator that integrates…
unclear · top 15,000 on PyPI
hydra-submitit-launcherIntegrates Hydra configuration framework with…
permissive · top 15,000 on PyPI
torchrunxtorchrunx distributes PyTorch training…
copyleft · top 15,000 on PyPI
torchtitantorchtitan is a PyTorch-native platform for…
permissive · top 15,000 on PyPI
skypilot-nightlySkyPilot provisions and manages AI compute jobs…
permissive · top 15,000 on PyPI
torchrlTorchRL is a PyTorch-native toolkit for…
unclear · top 5,000 on PyPI
aws-parallelclusterAWS ParallelCluster is a cluster management…
permissive · top 15,000 on PyPI
pulsar-galaxy-libPulsar Galaxy Lib is a Python server that…
permissive · top 15,000 on PyPI