Skip to content

BUG: Dask distributed integration tests failing on Travis #1540

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

Closed
jhamman opened this issue Aug 31, 2017 · 10 comments
Closed

BUG: Dask distributed integration tests failing on Travis #1540

jhamman opened this issue Aug 31, 2017 · 10 comments

Comments

@jhamman
Copy link
Member

jhamman commented Aug 31, 2017

Recent builds on travis are failing for the integration tests for dask distributed (example). Those tests are:

  • test_dask_distributed_integration_test[h5netcdf]
  • test_dask_distributed_integration_test[netcdf4]

The traceback includes this detail:

_______________ test_dask_distributed_integration_test[netcdf4] ________________
loop = <tornado.platform.epoll.EPollIOLoop object at 0x7fe36dc9e250>
engine = 'netcdf4'
    @pytest.mark.parametrize('engine', ENGINES)
    def test_dask_distributed_integration_test(loop, engine):
        with cluster() as (s, _):
            with distributed.Client(s['address'], loop=loop):
                original = create_test_data()
                with create_tmp_file(allow_cleanup_failure=ON_WINDOWS) as filename:
                    original.to_netcdf(filename, engine=engine)
                    with xr.open_dataset(filename, chunks=3, engine=engine) as restored:
                        assert isinstance(restored.var1.data, da.Array)
>                       computed = restored.compute()
xarray/tests/test_distributed.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
xarray/core/dataset.py:487: in compute
    return new.load()
xarray/core/dataset.py:464: in load
    evaluated_data = da.compute(*lazy_data.values())
../../../miniconda/envs/test_env/lib/python2.7/site-packages/dask/base.py:206: in compute
    results = get(dsk, keys, **kwargs)
../../../miniconda/envs/test_env/lib/python2.7/site-packages/distributed/client.py:1923: in get
    results = self.gather(packed, asynchronous=asynchronous)
../../../miniconda/envs/test_env/lib/python2.7/site-packages/distributed/client.py:1368: in gather
    asynchronous=asynchronous)
../../../miniconda/envs/test_env/lib/python2.7/site-packages/distributed/client.py:540: in sync
    return sync(self.loop, func, *args, **kwargs)
../../../miniconda/envs/test_env/lib/python2.7/site-packages/distributed/utils.py:239: in sync
    six.reraise(*error[0])
../../../miniconda/envs/test_env/lib/python2.7/site-packages/distributed/utils.py:227: in f
    result[0] = yield make_coro()
../../../miniconda/envs/test_env/lib/python2.7/site-packages/tornado/gen.py:1055: in run
    value = future.result()
../../../miniconda/envs/test_env/lib/python2.7/site-packages/tornado/concurrent.py:238: in result
    raise_exc_info(self._exc_info)
../../../miniconda/envs/test_env/lib/python2.7/site-packages/tornado/gen.py:1063: in run
    yielded = self.gen.throw(*exc_info)
../../../miniconda/envs/test_env/lib/python2.7/site-packages/distributed/client.py:1246: in _gather
    traceback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
>   c = a[b]
E   TypeError: string indices must be integers

Distributed v.1.18.1 was released 5 days ago so there must have been a breaking change that has been passed down to us.

cc @shoyer, @mrocklin

@shoyer
Copy link
Member

shoyer commented Aug 31, 2017

Interestingly they only seems to be failing on Python 2.7.

@mrocklin
Copy link
Contributor

mrocklin commented Aug 31, 2017 via email

@jhamman jhamman added the bug label Aug 31, 2017
@spencerahill
Copy link
Contributor

One bit that may be helpful: this is arising in aospy's tests, e.g. here. But, they're only occurring in our 'py27-min' environment (and are doing so with 100% consistency); never in our full 'py27' environment.

environment-py27-min.yml:

name: test_env
channels:
  - conda-forge
dependencies:
  - python=2.7
  - scipy
  - netCDF4
  - xarray
  - dask
  - distributed
  - pip:
    - coveralls
    - pytest-cov

environment-py27.yml

name: test_env
channels:
  - conda-forge
dependencies:
  - python=2.7
  - scipy
  - netCDF4
  - xarray
  - dask
  - distributed
  - pytest
  - future
  - matplotlib
  - ipython
  - pip:
    - coveralls
    - pytest-cov
    - pytest-catchlog
    - runipy

@mrocklin
Copy link
Contributor

mrocklin commented Aug 31, 2017 via email

@mrocklin
Copy link
Contributor

mrocklin commented Aug 31, 2017 via email

mrocklin added a commit to mrocklin/distributed that referenced this issue Aug 31, 2017
In dask#1328 we started allowing
Python 2 to use unicode keys, mostly to support Julia.  However this
change missed a the pack_data function used in worker.py which still
only checked for string-based keys.  This arose any time whenever
a task depended on a unicode key.

Fixes pydata/xarray#1540
@mrocklin
Copy link
Contributor

This should be resolved in dask/distributed#1370

@mrocklin
Copy link
Contributor

mrocklin commented Aug 31, 2017 via email

mrocklin added a commit to dask/distributed that referenced this issue Sep 1, 2017
In #1328 we started allowing
Python 2 to use unicode keys, mostly to support Julia.  However this
change missed a the pack_data function used in worker.py which still
only checked for string-based keys.  This arose any time whenever
a task depended on a unicode key.

Fixes pydata/xarray#1540
@mrocklin
Copy link
Contributor

mrocklin commented Sep 1, 2017

I've merged that PR. If you're testing against git-master then you might want to try retriggering tests.

@mrocklin
Copy link
Contributor

mrocklin commented Sep 1, 2017

I'm surprised that my Fixed #XXXX comment was able to close this issue. Since when am I able to close XArray issues?

@shoyer
Copy link
Member

shoyer commented Sep 5, 2017

@mrocklin I suspect it's because you have admin access to the "pydata" GitHub org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants