Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default Dask scheduler settings #2879

Merged
merged 2 commits into from
Oct 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.