Registry / ai-ml / torchft-nightly

torchft-nightly

JSON →
library2026.6.17pypypiunverified

TorchFT (Fault Tolerance) is a PyTorch library providing fault tolerant distributed training with automatic recovery from node failures. The nightly version (2026.4.27) tracks the latest development on PyTorch main branch. Requires Python >=3.8. Released daily.

pip install torchft-nightly
INSTALL
IMPORT
SIG · TORCHFT-NIGHTLY
T
torchft-nightly
ai-mlpythonv2026.6.17
Install
66.8s avg
Import
Disk
4787MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2026.6.17 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 77s
py 3.11
✕ build_error
✓ 69.1s
py 3.12
✕ build_error
✓ 63.3s
py 3.13
✕ build_error
✓ 58s
py 3.9
✕ build_error
✕ timeout
4787MB installed
● package 4787MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TorchftManager
from torchft.manager import TorchftManager
from torchft import TorchftManager
TorchftManager is defined in torchft.manager module; direct import from torchft does not expose it.
TorchftElasticAgent
from torchft.elastic import TorchftElasticAgent
from torchft.elastic_agent import TorchftElasticAgent
The module is named 'elastic', not 'elastic_agent'.

Initialize a fault-tolerant distributed training loop using TorchFT manager.

import torch import torch.distributed as dist from torchft.manager import TorchftManager # Initialize the process group (example: NCCL backend) dist.init_process_group(backend='nccl') # Create a TorchFT manager with fault tolerance manager = TorchftManager( store_addr=os.environ.get('STORE_ADDR', 'localhost:1234'), world_size=4, rank=dist.get_rank(), heartbeat_interval=1.0, ) # Wrap your model with the manager model = torch.nn.Linear(10, 10).cuda() optimizer = torch.optim.SGD(model.parameters(), lr=0.01) for step in range(100): inputs = torch.randn(32, 10, device='cuda') outputs = model(inputs) loss = outputs.sum() loss.backward() optimizer.step() optimizer.zero_grad() manager.commit() # checkpoint after each step # Cleanup manager.shutdown() dist.destroy_process_group()
Debug
Known issues
deprecatedThe `torchft.elastic` module is deprecated in favor of `torchft.manager` since nightly build 2026.3.15. Use `TorchftManager` instead of `TorchftElasticAgent`.
fix
Replace `from torchft.elastic import TorchftElasticAgent` with `from torchft.manager import TorchftManager`.
affects: >=2026.3.15
breakingIn nightly builds after 2026.4.10, the `TorchftManager` constructor requires `store_addr` as a string; previously it accepted optional `Store` object. This may break code using `torch.distributed.Store`.
fix
Change `TorchftManager(store=my_store, ...)` to `TorchftManager(store_addr='host:port', ...)` and use a TCPStore internally.
affects: >=2026.4.10
gotchaTorchFT nightly does not support CPU-only training; it requires CUDA. Running on CPU may cause silent hangs during heartbeat.
fix
Use `torch.cuda.is_available()` to assert GPU availability before using TorchFT.
affects: all
Upgrade
Version history
2026.6.17latest on PyPI · released Jun 17, 2026
Audit
Dependencies
torchrequiredCore dependency; TorchFT wraps PyTorch distributed primitives.
Agent activity
19 hits · last 30 days
node
16
Meta
1
OpenAI (training)
1
Resources