Skip to main content

Dask on DRMAA

Build Status

Deploy a Dask.distributed cluster on top of a cluster running a DRMAA-compliant job scheduler.

Example

Launch from Python

from dask_drmaa import DRMAACluster
cluster = DRMAACluster()

from dask.distributed import Client
client = Client(cluster)
cluster.start_workers(2)

>>> future = client.submit(lambda x: x + 1, 10)
>>> future.result()
11

Or launch from the command line:

$ dask-drmaa 10  # starts local scheduler and ten remote workers

Install

Currently this is only available through GitHub and source installation:

pip install git+https://github.com/dask/dask-drmaa.git --upgrade

or:

git clone git@github.com:dask/dask-drmaa.git
cd dask-drmaa
python setup.py install

You must have the DRMAA system library installed and be able to submit jobs from your local machine.

Testing

This repository contains a Docker-compose testing harness for a Son of Grid Engine cluster with a master and two slaves. You can initialize this system as follows

docker-compose build
./start-sge.sh

If you have done this previously and need to refresh your solution you can do the following

docker-compose stop
docker-compose build --no-cache
./start-sge.sh

And run tests with py.test in the master docker container

docker exec -it sge_master /bin/bash -c "cd /dask-drmaa; python setup.py develop"
docker exec -it sge_master /bin/bash -c "cd /dask-drmaa; py.test dask_drmaa --verbose"

Adaptive Load

Dask-drmaa can adapt to scheduler load, deploying more workers on the grid when it has more work, and cleaning up these workers when they are no longer necessary. This can simplify setup (you can just leave a cluster running) and it can reduce load on the cluster, making IT happy.

To enable this, call the Adaptive class on a DRMAACluster. You can submit computations to the cluster without ever explicitly creating workers.

from dask_drmaa import DRMAACluster, Adaptive
from dask.distributed import Client

cluster = DRMAACluster()
adapt = Adaptive(cluster)
client = Client(cluster)

futures = client.map(func, seq)  # workers will be created as necessary

Extensible

The DRMAA interface is the lowest common denominator among many different job schedulers like SGE, SLURM, LSF, Torque, and others. However, sometimes users need to specify parameters particular to their cluster, such as resource queues, wall times, memory constraints, etc..

DRMAA allows users to pass native specifications either when constructing the cluster or when starting new workers:

cluster = DRMAACluster(template={'nativeSpecification': '-l h_rt=01:00:00'})
# or
cluster.start_workers(10, nativeSpecification='-l h_rt=01:00:00')

Metadata

Release files for dask-drmaa 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dask-drmaa 0.1.2
File Size Uploaded Provenance
dask-drmaa-0.1.2.tar.gz 25.1 kB Without provenance Details

Release files / dask-drmaa-0.1.2.tar.gz

Download URL dask-drmaa-0.1.2.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
5d5ff119babc89d37bd6eb44e4f2297d5766d8e8614871d940a22f656f761030
BLAKE2b-256 checksum
How to use checksums
f2adfef83ca39d1601528b7d07f206c4ad8274675ce86e352b3e34150ecab8f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for dask-drmaa 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page