Skip to content

[0.14.1] ValueError from dask #3633

Closed
Closed

Description

@olebole

Description

When trying to build the Debian package, I also get the following error:

Exception occurred:
  File "/usr/lib/python3/dist-packages/sphinx_gallery/gen_gallery.py", line 313, in sumarize_failing_examples
    "\n" + "-" * 79)
ValueError: Here is a summary of the problems encountered when running the examples

Unexpected failing examples:
/build/skimage-0.14.1/doc/examples/xx_applications/plot_haar_extraction_selection_classification.py failed leaving traceback:
Traceback (most recent call last):
  File "/build/skimage-0.14.1/doc/examples/xx_applications/plot_haar_extraction_selection_classification.py", line 79, in <module>
    X = np.array(X.compute(scheduler='processes'))
  File "/usr/lib/python3/dist-packages/dask/base.py", line 156, in compute
    (result,) = compute(self, traverse=False, **kwargs)
  File "/usr/lib/python3/dist-packages/dask/base.py", line 392, in compute
    get=kwargs.pop('get', None))
  File "/usr/lib/python3/dist-packages/dask/base.py", line 866, in get_scheduler
    raise ValueError("Expected one of [distributed, %s]" % ', '.join(sorted(named_schedulers)))
ValueError: Expected one of [distributed, single-threaded, sync, synchronous, threading, threads]

Python 3.7, dask 1.0.0

Activity

  1. hmaarrfk commented on Dec 30, 2018

    @hmaarrfk
    Member
  2. hmaarrfk commented on Dec 30, 2018

    @hmaarrfk
    Member

    I think i get why. using the processes scheduler requires cloudpickle

    Maybe try adding 'cloudpickle >= 0.2.1' dependency? in your build?

  3. hmaarrfk commented on Dec 30, 2018

    @hmaarrfk
    Member

    As soon as I removed cloudpickle from my env, I was able to reproduce it, it started causing problems

    In [1]: from dask import delayed                                                                         
    In [2]: a = delayed([1, 2, 3])                                                                           
    In [3]: a.compute(scheduler='processes')                                                                 
    ---------------------------------------------------------------------------
    ValueError                                Traceback (most recent call last)
    <ipython-input-3-3a3d0ec9f3e8> in <module>
    ----> 1 a.compute(scheduler='processes')
    
    ~/miniconda3/envs/dask/lib/python3.7/site-packages/dask/base.py in compute(self, **kwargs)
        154         dask.base.compute
        155         """
    --> 156         (result,) = compute(self, traverse=False, **kwargs)
        157         return result
        158 
    
    ~/miniconda3/envs/dask/lib/python3.7/site-packages/dask/base.py in compute(*args, **kwargs)
        390     schedule = get_scheduler(scheduler=kwargs.pop('scheduler', None),
        391                              collections=collections,
    --> 392                              get=kwargs.pop('get', None))
        393 
        394     dsk = collections_to_dsk(collections, optimize_graph, **kwargs)
    
    ~/miniconda3/envs/dask/lib/python3.7/site-packages/dask/base.py in get_scheduler(get, scheduler, collections, cls)
        864             return get_client().get
        865         else:
    --> 866             raise ValueError("Expected one of [distributed, %s]" % ', '.join(sorted(named_schedulers)))
        867         # else:  # try to connect to remote scheduler with this name
        868         #     return get_client(scheduler).get
    
    ValueError: Expected one of [distributed, single-threaded, sync, synchronous, threading, threads]
  4. olebole commented on Dec 30, 2018

    @olebole
    ContributorAuthor

    Yep, that was a missing dependency. Thank you for the hint! With this, I can completely build the package. Since this is a Debian problem, I am closing it here.

  5. hmaarrfk commented on Dec 30, 2018

    @hmaarrfk
    Member

    cloudpickle is indeed a listed dependency for scikit-image 0.14.1
    https://github.com/scikit-image/scikit-image/blob/v0.14.x/requirements/default.txt#L9

    I'm going to move it to docs for master.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions