A utility package to scaffold PyTorch's DDP
Project description
DDPW
Distributed Data Parallel Wrapper (DDPW) is created as a utility package to encapsulate the scaffolding for PyTorch's Distributed Data Parallel.
This code is written in Python. The DDPW documentation contains details on how to use this package.
Overview
Installation
conda install -c tvsujal ddpw # with conda
pip install ddpw # with pip from PyPI
Usage
from ddpw.platform import Platform, PlatformConfig
from ddpw.artefacts import ArtefactsConfig
from ddpw.job import JobConfig, JobMode
from ddpw.wrapper import Wrapper
from src import MyDataset, MyModel, MyOptimiser, MyTrainer
# datasets
train_set = MyDataset(train=True)
test_set = MyDataset(train=False)
# configure the platform
p_config = PlatformConfig(platform=Platform.GPU, n_gpus=4, cpus_per_task=2)
# configure the artefacts (model, dataset, optimiser, etc.)
a_config = ArtefactsConfig(train_set=train_set, test_set=test_set,
batch_size=64, model=MyModel(), optimiser_loader=MyOptimiser(lr=0.1))
# call the job
Wrapper(p_config, a_config).start(MyTrainer())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ddpw-4.0.0.tar.gz
(10.8 kB
view details)
Built Distribution
ddpw-4.0.0-py3-none-any.whl
(12.7 kB
view details)
File details
Details for the file ddpw-4.0.0.tar.gz
.
File metadata
- Download URL: ddpw-4.0.0.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ffc4313585986f60f4cf25017b3c539b3edb22fd72181d03f465d2b0c2f0161 |
|
MD5 | a7371b817121bd18d3d0f53dcb393919 |
|
BLAKE2b-256 | 07b0be54cd9e0e072a5c2ff7ff179e171a5ab8ffb955a12595bad5ea97d265dd |
File details
Details for the file ddpw-4.0.0-py3-none-any.whl
.
File metadata
- Download URL: ddpw-4.0.0-py3-none-any.whl
- Upload date:
- Size: 12.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc4e5f2ee96b29637a5c057c941a4e76e543b97dd2ce93064c7107e4dee3c4ee |
|
MD5 | 12c4eba95d5593286a52e28ffc452d55 |
|
BLAKE2b-256 | 5e34200c5d1ebb0bba6d4aba40642a5d6be9af3a4ffe3c258cc373fb52c8fcc5 |