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
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()
Upgrade
Version history
2026.6.17latest on PyPI · released Jun 17, 2026
Audit
Dependencies
torchrequiredCore dependency; TorchFT wraps PyTorch distributed primitives.