Metadata-Version: 2.5
Name: warpscale
Version: 0.2.0
Summary: Warpscale PyTorch training SDK
Project-URL: Homepage, https://warpscale.ai
Project-URL: Documentation, https://docs.warpscale.ai
Author-email: Orbit CI Inc <support@warpscale.ai>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: gpu,machine-learning,observability,pytorch,telemetry,training
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# warpscale

Python SDK to report PyTorch training progress to Warpscale.

## Install

```bash
pip install warpscale
```

## Use

```python
import warpscale

# Once, after dist.init_process_group() — without a live process group there is
# no rank to elect an emitter from, and nothing is reported.
warpscale.init(total_steps=40_000, total_epochs=3, framework="fsdp", precision="bf16")

# Call on every rank; rank 0 emits, the rest are no-ops.
for epoch in range(epochs):
    for batch in loader:
        ...                       # one optimizer step
        warpscale.step()
    warpscale.epoch()
    warpscale.checkpoint_started()
    save_checkpoint()             # incl. the async dcp.async_save tail
    warpscale.checkpoint_persisted()
```

## Launch

`torchrun` sets `WORLD_SIZE` itself and needs nothing extra. A run with no
process group must declare `WORLD_SIZE=1` for its lone process to be elected:

```bash
WORLD_SIZE=1 warpscale run python train.py
```

A script that starts its own ranks with `mp.spawn` is not supported — before
`init_process_group()` every sibling looks like the lone process, so none is
elected and nothing is reported. Use `torchrun`.
