torchrunx
Automatically initialize distributed PyTorch environments
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you need functional, in-script control over distributed PyTorch training and are comfortable with GPLv3 copyleft terms. The low install friction and active maintenance are positive signals, but the young codebase and modest adoption mean it lacks the battle-testing of established alternatives. Best for teams already using GPLv3 or open-source projects; avoid if your codebase must remain proprietary.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Linux; multi-machine use requires SSH access and a shared filesystem between hosts.
- Low install friction with a pure-Python wheel.
- Actively maintained with a recent commit on 2026-08-04 and only 10 days since the latest release, though the project is young with a modest star count of 60.
License · maintenance · safety
copyleft license (copyleft) — Licensed under GNU General Public License Version 3, a copyleft license. Any derivative work or distribution must also be released under GPLv3 and include source code; proprietary use or closed-source distribution is not permitted.
last release 2026-08-04 (10 days) · last repo commit 2026-08-04 · 60 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 161,386 downloads/mo, #10,637 on PyPI
Alternatives
Verify before relying
pip install torchrunx
import torchrunx
import torch
def train_fn(output_dir: str) -> str:
rank = int(__import__('os').environ['RANK'])
if rank == 0:
return output_dir
return None
launcher = torchrunx.Launcher(hostnames=["localhost"], workers_per_host="gpu")
results = launcher.run(train_fn, output_dir="outputs")
checkpoint = results.rank(0)- Whether the package works on Windows or macOS, or is truly Linux-only as stated
- Performance overhead compared to native torchrun or accelerate launch
- Maturity and stability guarantees given the first release in 2024-07-13
What it is and what it does
torchrunx is a functional launcher for PyTorch distributed training that replaces CLI-based tools. Instead of shell commands, you write a single Python function and pass it to a Launcher object, which handles environment setup, rank assignment, and result collection across devices. It depends on torch, numpy, cloudpickle for serialization, and fabric for SSH communication.
The package is designed for multi-GPU and multi-machine setups, requiring Linux and SSH with a shared filesystem for multi-machine scenarios. It integrates with standard PyTorch distributed patterns (DistributedDataParallel, environment variables like RANK and LOCAL_RANK) and supports frameworks like Transformers, DeepSpeed, PyTorch Lightning, and Accelerate. Results from each rank are collected and returned to the caller, enabling complex workflows within a single script.
Use it for
- Launch distributed training across multiple GPUs on a single machine without writing shell scripts
- Coordinate multi-machine training with automatic SSH setup and result aggregation
- Integrate distributed training into larger Python workflows that need to inspect or process per-rank outputs
- Fine-tune large language models using Transformers or DeepSpeed with functional control
- Run single-GPU training with automatic environment variable setup for compatibility
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you need functional, in-script control over distributed PyTorch training and are comfortable with GPLv3 copyleft terms. The low install friction and active maintenance are positive signals, but the young codebase and modest adoption mean it lacks the battle-testing of established alternatives. Best for teams already using GPLv3 or open-source projects; avoid if your codebase must remain proprietary.
Install
torchrunx on PyPI
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a recent commit on 2026-08-04 and only 10 days since the latest release, though the project is young with a modest star count of 60.
Requires Linux; multi-machine use requires SSH access and a shared filesystem between hosts.
License in practice
Licensed under GNU General Public License Version 3, a copyleft license. Any derivative work or distribution must also be released under GPLv3 and include source code; proprietary use or closed-source distribution is not permitted.
Quickstart
pip install torchrunx
import torchrunx
import torch
def train_fn(output_dir: str) -> str:
rank = int(__import__('os').environ['RANK'])
if rank == 0:
return output_dir
return None
launcher = torchrunx.Launcher(hostnames=["localhost"], workers_per_host="gpu")
results = launcher.run(train_fn, output_dir="outputs")
checkpoint = results.rank(0)
Verify before relying
- Whether the package works on Windows or macOS, or is truly Linux-only as stated
- Performance overhead compared to native torchrun or accelerate launch
- Maturity and stability guarantees given the first release in 2024-07-13
Package facts
| License | copyleft license copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagescloudpicklefabrictorchnumpy |
| Maintenance | Actively maintained 10 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 161,386 / month, #10,637 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: torchrunx-0.4.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “distributed pytorch training”
- torchrunxtorchrunx distributes PyTorch training functions across multiple GPUs…
- accelerateAccelerate abstracts away distributed training boilerplate for…
- torchtntTNT provides training utilities and tools for PyTorch models,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework that enables you to define and call remote procedures across network boundaries using protocol buffers for serialization.
Install it if you need RPC communication in a distributed system or are integrating with existing gRPC services.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
Cloudpickle extends Python's standard pickle module to serialize lambda functions, interactively-defined functions and classes, and other constructs that the default pickle cannot handle, making it suitable for cluster computing and remote code execution.
Install it if you need to serialize lambda functions, interactively-defined code, or non-standard Python constructs for cluster computing or distributed execution.
Provides a unified, open()-compatible Python API for streaming large files from remote storage (S3, GCS, Azure, HDFS, SFTP, HTTP) and local filesystems, with transparent compression support.
Install it if you work with large files on cloud storage or remote systems and want to avoid writing boilerplate around multiple SDKs.
Portalocker provides cross-platform file locking with support for exclusive and shared locks, plus Redis-based distributed locks and process-aware PID file locking.
Install it if you need file or process coordination; the optional extras (pywin32, redis) are only required for specific lock types.
Ray is a distributed computing framework that scales Python applications from a single machine to multi-node clusters, providing abstractions for parallel tasks, stateful actors, and shared objects.
See also accelerate · metaflow-torchrun · torchft-nightly · torchmetrics · fairscale · torchx · lightning · pytorch-lightning · torcheval · litdata