ddpw


Nameddpw JSON
Version 5.3.0 PyPI version JSON
download
home_pageNone
SummaryA lightweight wrapper that scaffolds PyTorch's (Distributed Data) Parallel.
upload_time2024-10-04 22:36:04
maintainerSujal Vijayaraghavan
docs_urlNone
authorSujal Vijayaraghavan
requires_python>=3.10
licenseBSD 3-Clause Licence Copyright (c) 2021-2024 Sujal Vijayaraghavan. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords pytorch distributed compute
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">DDPW</h1>

**Distributed Data Parallel Wrapper (DDPW)** is a lightweight Python wrapper
relevant for [PyTorch](https://pytorch.org/) 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.10. The [documentation](https://ddpw.projects.sujal.tv) contains
details on how to use this package.

## Overview

### Installation

[![Conda](https://img.shields.io/conda/v/tvsujal/ddpw)](https://anaconda.org/tvsujal/ddpw)
[![PyPI](https://img.shields.io/pypi/v/ddpw)](https://pypi.org/project/ddpw/)

```bash
conda install ddpw -c tvsujal # with conda
pip install ddpw # with pip from PyPI
```

### Usage

```python
from ddpw import Platform, Wrapper

# some task
def task(global_rank, local_rank, group, args):
    print(f'This is GPU {global_rank}(G)/{local_rank}(L); args = {args}') 

# platform (e.g., 4 GPUs)
platform = Platform(device='gpu', n_gpus=4)

# wrapper
wrapper = Wrapper(platform=platform)

# start
wrapper.start(task, ('example',))
```

---

###### Status

[![Publish to Anaconda](https://github.com/sujaltv/ddpw/actions/workflows/conda_publish.yaml/badge.svg)](https://github.com/sujaltv/ddpw/actions/workflows/conda_publish.yaml)
[![Publish to PyPI](https://github.com/sujaltv/ddpw/actions/workflows/pypi_publish.yaml/badge.svg)](https://github.com/sujaltv/ddpw/actions/workflows/pypi_publish.yaml)
[![Publish documentation](https://github.com/sujaltv/ddpw/actions/workflows/s3_publish.yaml/badge.svg)](https://github.com/sujaltv/ddpw/actions/workflows/s3_publish.yaml)


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ddpw",
    "maintainer": "Sujal Vijayaraghavan",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "pytorch, distributed compute",
    "author": "Sujal Vijayaraghavan",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/35/88/795f33ea50a75e3af9b224ddd971460fed6bcb9e7b5412c353e167d9dd6b/ddpw-5.3.0.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">DDPW</h1>\n\n**Distributed Data Parallel Wrapper (DDPW)** is a lightweight Python wrapper\nrelevant for [PyTorch](https://pytorch.org/) users.\n\nDDPW handles basic logistical tasks such as creating threads on GPUs/SLURM\nnodes, setting up inter-process communication, _etc._, and provides simple,\ndefault utility methods to move modules to devices and get dataset samplers,\nallowing the user to focus on the main aspects of the task. It is written in\nPython 3.10. The [documentation](https://ddpw.projects.sujal.tv) contains\ndetails on how to use this package.\n\n## Overview\n\n### Installation\n\n[![Conda](https://img.shields.io/conda/v/tvsujal/ddpw)](https://anaconda.org/tvsujal/ddpw)\n[![PyPI](https://img.shields.io/pypi/v/ddpw)](https://pypi.org/project/ddpw/)\n\n```bash\nconda install ddpw -c tvsujal # with conda\npip install ddpw # with pip from PyPI\n```\n\n### Usage\n\n```python\nfrom ddpw import Platform, Wrapper\n\n# some task\ndef task(global_rank, local_rank, group, args):\n    print(f'This is GPU {global_rank}(G)/{local_rank}(L); args = {args}') \n\n# platform (e.g., 4 GPUs)\nplatform = Platform(device='gpu', n_gpus=4)\n\n# wrapper\nwrapper = Wrapper(platform=platform)\n\n# start\nwrapper.start(task, ('example',))\n```\n\n---\n\n###### Status\n\n[![Publish to Anaconda](https://github.com/sujaltv/ddpw/actions/workflows/conda_publish.yaml/badge.svg)](https://github.com/sujaltv/ddpw/actions/workflows/conda_publish.yaml)\n[![Publish to PyPI](https://github.com/sujaltv/ddpw/actions/workflows/pypi_publish.yaml/badge.svg)](https://github.com/sujaltv/ddpw/actions/workflows/pypi_publish.yaml)\n[![Publish documentation](https://github.com/sujaltv/ddpw/actions/workflows/s3_publish.yaml/badge.svg)](https://github.com/sujaltv/ddpw/actions/workflows/s3_publish.yaml)\n\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause Licence  Copyright (c) 2021-2024 Sujal Vijayaraghavan. All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "A lightweight wrapper that scaffolds PyTorch's (Distributed Data) Parallel.",
    "version": "5.3.0",
    "project_urls": {
        "Documentation": "https://ddpw.projects.sujal.tv",
        "Homepage": "https://ddpw.projects.sujal.tv",
        "Repository": "https://github.com/sujaltv/ddpw"
    },
    "split_keywords": [
        "pytorch",
        " distributed compute"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "410fb2641defa42d378fe412002970906682a2cc016119afb053cb0ef3c27d4e",
                "md5": "126a8e2a716a9a384904fa6b9eb26d46",
                "sha256": "49ac0dc00811e46cd0296e7fd4e7296ad58f34f755933469f11593531d91d5ce"
            },
            "downloads": -1,
            "filename": "ddpw-5.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "126a8e2a716a9a384904fa6b9eb26d46",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 12594,
            "upload_time": "2024-10-04T22:36:02",
            "upload_time_iso_8601": "2024-10-04T22:36:02.785314Z",
            "url": "https://files.pythonhosted.org/packages/41/0f/b2641defa42d378fe412002970906682a2cc016119afb053cb0ef3c27d4e/ddpw-5.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3588795f33ea50a75e3af9b224ddd971460fed6bcb9e7b5412c353e167d9dd6b",
                "md5": "a1ae2cf63cd35c73db2fad6a8385ee3e",
                "sha256": "7c943736b6d38baf2190b49cde23df22b255a8d3406264c6d934d13a6740e4df"
            },
            "downloads": -1,
            "filename": "ddpw-5.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a1ae2cf63cd35c73db2fad6a8385ee3e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 12202,
            "upload_time": "2024-10-04T22:36:04",
            "upload_time_iso_8601": "2024-10-04T22:36:04.244030Z",
            "url": "https://files.pythonhosted.org/packages/35/88/795f33ea50a75e3af9b224ddd971460fed6bcb9e7b5412c353e167d9dd6b/ddpw-5.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-04 22:36:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sujaltv",
    "github_project": "ddpw",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "ddpw"
}
        
Elapsed time: 0.58418s