Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Dask JupyterLab Extension

Build Status Version Downloads Dependencies

This package provides a JupyterLab extension to manage Dask clusters, as well as embed Dask's dashboard plots directly into JupyterLab panes.

Dask Extension

Explanatory Video (5 minutes)

Dask + JupyterLab Screencast

Requirements

JupyterLab >= 1.0 distributed >= 1.24.1

Installation

To install the Dask JupyterLab extension you will need both JupyterLab, and Node.js, with at least version 12. These are available through a variety of sources. One source common to Python users is the conda package manager.

conda install jupyterlab
conda install -c conda-forge nodejs

This extension includes both a client-side JupyterLab extension and a server-side Jupyter notebook extension. Install via pip or conda-forge:

pip install dask_labextension
conda install -c conda-forge dask-labextension

and build the extension as follows:

jupyter labextension install dask-labextension
jupyter serverextension enable dask_labextension

If you are running Notebook 5.2 or earlier, enable the server extension by running

jupyter serverextension enable --py --sys-prefix dask_labextension

Configuration of Dask cluster management

This extension has the ability to launch and manage several kinds of Dask clusters, including local clusters and kubernetes clusters. Options for how to launch these clusters are set via the dask configuration system, typically a .yml file on disk.

By default the extension launches a LocalCluster, for which the configuration is:

labextension:
  factory:
    module: 'dask.distributed'
    class: 'LocalCluster'
    args: []
    kwargs: {}
  default:
    workers: null
    adapt:
      null
      # minimum: 0
      # maximum: 10
  initial:
    []
    # - name: "My Big Cluster"
    #   workers: 100
    # - name: "Adaptive Cluster"
    #   adapt:
    #     minimum: 0
    #     maximum: 50

In this configuration, factory gives the module, class name, and arguments needed to create the cluster. The default key describes the initial number of workers for the cluster, as well as whether it is adaptive. The initial key gives a list of initial clusters to start upon launch of the notebook server.

In addition to LocalCluster, this extension has been used to launch several other Dask cluster objects, a few examples of which are:

  • A SLURM cluster, using
labextension:
    factory:
      module: 'dask_jobqueue'
       class: 'SLURMCluster'
       args: []
       kwargs: {}
  • A PBS cluster, using
labextension:
  factory:
    module: 'dask_jobqueue'
    class: 'PBSCluster'
    args: []
    kwargs: {}
labextension:
  factory:
    module: dask_kubernetes
    class: KubeCluster
    args: []
    kwargs: {}

Development install

As described in the JupyterLab documentation for a development install of the labextension you can run the following in this directory:

jlpm install   # Install npm package dependencies
jlpm run build  # Compile the TypeScript sources to Javascript
jupyter labextension install  # Install the current directory as an extension

To rebuild the extension:

jlpm run build

If you run JupyterLab in watch mode (jupyter lab --watch) it will automatically pick up changes to the built extension and rebundle itself.

To run an editable install of the server extension, run

pip install -e .
jupyter serverextension enable --sys-prefix dask_labextension

Publishing

This application is distributed as two subpackages.

The JupyterLab frontend part is published to npm, and the server-side part to PyPI.

Releases for both packages are done with the jlpm tool, git and Travis CI.

Note: Package versions are not prefixed with the letter v. You will need to disable this.

$ jlpm config set version-tag-prefix ""

Making a release

$ jlpm version [--major|--minor|--patch]  # updates package.json and creates git commit and tag
$ git push upstream master && git push upstream master --tags  # pushes tags to GitHub which triggers Travis CI to build and deploy

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dask_labextension-5.0.0rc0.tar.gz (69.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dask_labextension-5.0.0rc0-py3-none-any.whl (60.5 kB view details)

Uploaded Python 3

File details

Details for the file dask_labextension-5.0.0rc0.tar.gz.

File metadata

  • Download URL: dask_labextension-5.0.0rc0.tar.gz
  • Upload date:
  • Size: 69.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for dask_labextension-5.0.0rc0.tar.gz
Algorithm Hash digest
SHA256 2f513f1c10d9a941c1a41bc94a99c6ffdb9e3041b04fcb042e1193a3c383daa2
MD5 db2bde00642439308c4325f7d3449961
BLAKE2b-256 32e5991af1818588e1849d24f9f6b2b3b5ffbdc10dfa01c3bc82c2d4014008ae

See more details on using hashes here.

File details

Details for the file dask_labextension-5.0.0rc0-py3-none-any.whl.

File metadata

  • Download URL: dask_labextension-5.0.0rc0-py3-none-any.whl
  • Upload date:
  • Size: 60.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2.post20201201 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for dask_labextension-5.0.0rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 df42e749a095e0024fd52edcf00b01d7db054e039dbcd1e39ff2c69750053c07
MD5 ba0178030812745d82a1e4b8b701f5b2
BLAKE2b-256 fd16ef68d51a62b82d31d631344bd8d3e61367021e70d3d6d4fbc22cb0edb7d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page