DDPW
Distributed Data Parallel Wrapper (DDPW) is a lightweight Python wrapper for PyTorch users.
DDPW handles basic logistical tasks such as creating threads on GPUs/SLURM nodes, setting up inter-process communication, etc., and provides simple, default utility methods to move modules to devices and get dataset samplers, allowing the user to focus on the main aspects of the task. It is written in Python 3.12. The documentation contains details on how to use this package.
Overview
Installation
# with uv
# to instal and add to pyroject.toml
uv add [--active] ddpw
# or to simply instal
uv pip install ddpw
# with pip
pip install ddpw
Examples
With the decorator wrapper
from ddpw import Platform, wrapper
platform = Platform(device="gpu", n_cpus_per_node=32, mem_per_node=64, n_gpus_per_node=4, verbose=True)
@wrapper(platform)
def run(*args, **kwargs):
# global and local ranks, and the process group in:
# kwargs['global_rank'], # kwargs['local_rank'], kwargs['group']
pass
if __name__ == '__main__':
run(*args, **kwargs)
As a callable
from ddpw import Platform, Wrapper
# some task
def run(*args, **kwargs):
# global and local ranks, and the process group in:
# kwargs['global_rank'], # kwargs['local_rank'], kwargs['group']
pass
if __name__ == '__main__':
# platform (e.g., 4 GPUs)
platform = Platform(device='gpu', n_gpus_per_node=4)
# wrapper
wrapper = Wrapper(platform=platform)
# start
wrapper.start(task, *args, **kwargs)
Release files for ddpw 6.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ddpw-6.2.0.tar.gz | 12.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ddpw-6.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.7 kB
Release files / ddpw-6.2.0.tar.gz
| Download URL | ddpw-6.2.0.tar.gz |
|---|---|
| Size | 12.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
45f96c81284c9f7f71f6e1a4f1c946e81604b1f2ae169dc2436d4e48b1b65f4c
|
|
BLAKE2b-256 checksum How to use checksums |
7e592f65089ec086fa29f7504714f91ed1f5ba1acdcadd1e94739c658d73f67e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / ddpw-6.2.0-py3-none-any.whl
| Download URL | ddpw-6.2.0-py3-none-any.whl |
|---|---|
| Size | 15.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a39c34e92720d51f96ad0457a1924bf42c6a579511dc5f9d2f93e4d9a490197b
|
|
BLAKE2b-256 checksum How to use checksums |
1bc8db85b3dbcf1750c549d3b321aabebfd21ca18bdfeec1f7d963d41dfdc943
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|