skillfed

torchx

TorchX SDK and Components

torchx v0.7.0 251.4K downloads/30d#8,586 on PyPI428
Permissive license BSD-3 Active released

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 torchx

uv

uv add torchx

poetry

poetry add torchx

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.8Topic :: Scientific/Engineering :: Artificial Intelligence

Tags

pytorch job launcherdistributed training schedulerml pipeline orchestrationkubernetes pytorch jobsslurm job submissionmulti-scheduler ml workloadspytorch batch runner
pytorchjob-orchestrationdistributed-computing

More Artificial Intelligence packages