Unified Distributed Execution
Project description
Unified Distributed Execution
What is unidist?
unidist is a framework that is intended to provide the unified API for distributed execution by supporting various performant execution backends. At the moment the following backends are supported under the hood:
unidist is designed to work in a task-based parallel model.
Also, the framework provides a sequential Python
backend, that can be used for debugging.
Installation
Currently, unidist can be installed from sources using pip
:
# Dependencies for `MultiProcessing` and `Python` backends will be installed as these are supported by default
$ pip install git+https://github.com/modin-project/unidist
# Dependencies for all the execution backends will be installed
$ pip install git+https://github.com/modin-project/unidist#egg=unidist[all]
# Dependencies for `Ray` execution backend will be installed
$ pip install git+https://github.com/modin-project/unidist#egg=unidist[ray]
This will install unidist directly from the repo without you having to manually clone it! Please be aware that the latest changes have not made it into a release and may not be completely stable.
Choosing an execution backend
There are several ways to choose the execution backend for distributed computation. First, the recommended way is to use unidist CLI options:
# Running the script with unidist on Ray backend
$ unidist script.py --backend ray
# Running the script with unidist on Dask backend
$ unidist script.py --backend dask
Second, setting the environment variable:
# unidist will use Ray backend to distribute computations
export UNIDIST_BACKEND=ray
# unidist will use Dask backend to distribute computations
export UNIDIST_BACKEND=dask
Third, using config API directly in your script:
import unidist.config as cfg
cfg.Backend.put("ray") # unidist will use Ray backend to distribute computations
import unidist.config as cfg
cfg.Backend.put("dask") # unidist will use Dask backend to distribute computations
Default execution backend for unidist is Ray.
Usage
unidist provides CLI interface to run python programs.
import unidist
unidist.init() # Ray backend is used by default
@unidist.remote
def foo(x):
return x * x
# This will run `foo` on a pool of workers in parallel;
# `refs` will contain object references to actual data
refs = [foo.remote(i) for i in range(5)]
# To get the data call `unidist.get(...)`
print(unidist.get(refs))
[0, 1, 4, 9, 16]
For more examples refer to Getting Started section in our documentation.
Full Documentation
Visit the complete documentation on readthedocs: https://unidist.readthedocs.io.
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
Built Distributions
File details
Details for the file unidist-0.1.0.tar.gz
.
File metadata
- Download URL: unidist-0.1.0.tar.gz
- Upload date:
- Size: 73.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b2cc602604f75ed6a9323cd4cd0585a1c806d3465f50ecb7ff31772b80f2edb |
|
MD5 | 6ae5225edc63ac6a1da482c82d2b6a16 |
|
BLAKE2b-256 | 1c70b965ef73cc52b3ffff287d1b7a941789b125ec53cffca27fdd917e272fef |
File details
Details for the file unidist-0.1.0-py3-none-win_amd64.whl
.
File metadata
- Download URL: unidist-0.1.0-py3-none-win_amd64.whl
- Upload date:
- Size: 98.4 kB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66d64b22ed4e1a9103506ac465cdf9c75521b948ee2ba9d6a3f45f9683ee5711 |
|
MD5 | 67d17b8ad6b2ada53dac0702c0896fe9 |
|
BLAKE2b-256 | 642a5d527d5a588d1f36cb9739efbca607f8ecded1ee7cfaf8079c144e4ff33e |
File details
Details for the file unidist-0.1.0-py3-none-win32.whl
.
File metadata
- Download URL: unidist-0.1.0-py3-none-win32.whl
- Upload date:
- Size: 98.4 kB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39ddfba9f99cf68972af3a9caa7db7cb0db38422b9aba56ced8411343870f341 |
|
MD5 | 30b87fa5524f0eac0cb484265af91467 |
|
BLAKE2b-256 | 3ff51332d55fc8a0f71ee9dbb2b1a4d9a02766438a65d2fe49ac096c9669f238 |
File details
Details for the file unidist-0.1.0-py3-none-manylinux1_x86_64.whl
.
File metadata
- Download URL: unidist-0.1.0-py3-none-manylinux1_x86_64.whl
- Upload date:
- Size: 98.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cda215a4e0db7efbddb1967209d846aff2a3905b1e7eac18d50ba5abda591ab3 |
|
MD5 | b739bf5670fe2d574fd574ebc16e2cfc |
|
BLAKE2b-256 | 35c6783c06a4c456d93cfe5f717cd558885279cded0b7a95e004f79daaef81ed |
File details
Details for the file unidist-0.1.0-py3-none-manylinux1_i686.whl
.
File metadata
- Download URL: unidist-0.1.0-py3-none-manylinux1_i686.whl
- Upload date:
- Size: 98.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e132d50f4550d79ba7a5d406deae89cf953536e8b3d46da5922d4a94be09feca |
|
MD5 | 04be85e65c2a846f604629b9b963e5ac |
|
BLAKE2b-256 | 87be75faf8f56aff560aa9f6fe30d8b4b9f4a25175de6b989b4bed1e4cd21095 |
File details
Details for the file unidist-0.1.0-py3-none-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: unidist-0.1.0-py3-none-macosx_10_9_x86_64.whl
- Upload date:
- Size: 98.4 kB
- Tags: Python 3, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88405fae39b1259ba4bc15e3265117e8356c6cdd031d9625fc3f614092a75560 |
|
MD5 | 5ccd989788b40965f7e1b123142add4a |
|
BLAKE2b-256 | 73072ac8491e2a25de56eb5bd9715b9f8ea054f4612a630919a07c59dd318d28 |