Skip to content

Commit

Permalink
Use default Dask scheduler settings (#2879)
Browse files Browse the repository at this point in the history
Disable dask.set_options call on _lazy_data import.
  • Loading branch information
pp-mo authored and pelson committed Oct 27, 2017
1 parent c36f901 commit e794a1c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 87 deletions.
24 changes: 0 additions & 24 deletions lib/iris/_lazy_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,6 @@
import numpy.ma as ma


def _iris_dask_defaults():
"""
Set dask defaults for Iris. The current default dask operation mode for
Iris is running single-threaded using `dask.local.get_sync`. This default
ensures that running Iris under "normal" conditions will not use up all
available computational resource.
Otherwise, by default, `dask` will use a multi-threaded scheduler that uses
all available CPUs.
.. note::
We only want Iris to set dask options in the case where doing so will
not change user-specified options that have already been set.
"""
if 'pool' not in dask.context._globals and \
'get' not in dask.context._globals:
dask.set_options(get=dget_sync)


# Run this at import time to set dask options for Iris.
_iris_dask_defaults()


def is_lazy_data(data):
"""
Return whether the argument is an Iris 'lazy' data array.
Expand Down
63 changes: 0 additions & 63 deletions lib/iris/tests/unit/lazy_data/test_iris_dask_defaults.py

This file was deleted.

0 comments on commit e794a1c

Please sign in to comment.