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

AttributeError: module 'dask.array.numpy_compat' has no attribute 'nancumprod' #4846

Closed
letmaik opened this issue May 26, 2019 · 13 comments · Fixed by conda-forge/dask-feedstock#73

Comments

@letmaik
Copy link

@letmaik letmaik commented May 26, 2019

These lines are incorrect:

dask/dask/array/chunk.py

Lines 70 to 74 in 125e0d7

try:
from numpy import nancumprod, nancumsum
except ImportError: # pragma: no cover
nancumprod = npcompat.nancumprod
nancumsum = npcompat.nancumsum

The numpy_compat module doesn't define these functions, hence it will fail badly with older numpy versions, like 1.11.

The numpy_compat moduled contained the functions up until dask 1.2.0, with 1.2.1 they vanished.

@TomAugspurger

This comment has been minimized.

Copy link
Member

@TomAugspurger TomAugspurger commented May 26, 2019

We recently bumped the minimum numpy version to 1.13. How’d you install dask?

@letmaik

This comment has been minimized.

Copy link
Author

@letmaik letmaik commented May 26, 2019

conda create --name pyenv python=3.6
...
conda install numpy=1.11 dask

https://ci.appveyor.com/project/letmaik/rawpy/builds/24820422/job/mcp7o1ajeo9cv3d5#L741

@TomAugspurger

This comment has been minimized.

Copy link
Member

@TomAugspurger TomAugspurger commented May 26, 2019

Did dask come from conda forge or defaults?

@TomAugspurger

This comment has been minimized.

Copy link
Member

@TomAugspurger TomAugspurger commented May 27, 2019

I see that our dependencies on Conda-forge weren't updated. I'll make a PR updating them.

@TomAugspurger TomAugspurger mentioned this issue May 27, 2019
4 of 4 tasks complete
@TomAugspurger

This comment has been minimized.

Copy link
Member

@TomAugspurger TomAugspurger commented May 27, 2019

@letmaik conda-forge should be building corrected packages now.

@jakirkham do you know if the bad packages need to be manually removed? i.e. will conda install -c conda-forge numpy=1.11 dask=1.2.2 correctly error in the future, or will the solver fall back to the lower build number with the incorrect metadata?

@letmaik

This comment has been minimized.

Copy link
Author

@letmaik letmaik commented May 27, 2019

This came from defaults. Just run these commands and you can reproduce it:

conda create --name dask-test python=3.6 numpy=1.11 dask
conda activate dask-test
python -c "import dask.array"
@TomAugspurger

This comment has been minimized.

Copy link
Member

@TomAugspurger TomAugspurger commented May 27, 2019

@jakirkham

This comment has been minimized.

Copy link
Member

@jakirkham jakirkham commented May 28, 2019

Thanks @TomAugspurger. I've pulled what I believe to be the broken packages from conda-forge (as noted in your PR), but if you can recheck that would be very helpful.

@jakirkham

This comment has been minimized.

Copy link
Member

@jakirkham jakirkham commented May 28, 2019

Independently it's probably worth dropping these fallbacks as they are not needed. Have submitted PR ( #4850 ) to address that.

@TomAugspurger

This comment has been minimized.

Copy link
Member

@TomAugspurger TomAugspurger commented May 28, 2019

@jakirkham confirmed for conda-forge

$ conda create --name dask-test -c conda-forge python=3.6 numpy=1.11 dask=1.2.2                                                                                                                                                                                                                             643ms  Tue May 28 13:15:54 2019
Collecting package metadata:
Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - dask=1.2.2
  - numpy=1.11
Use "conda search <package> --info" to see the dependencies for each package.
@jakirkham

This comment has been minimized.

Copy link
Member

@jakirkham jakirkham commented May 28, 2019

Thanks Tom!

@grlee77 grlee77 mentioned this issue Jul 17, 2019
0 of 1 task complete
@grlee77

This comment has been minimized.

Copy link

@grlee77 grlee77 commented Jul 17, 2019

@jakirkham:
I think there are still some builds that may need to be marked as broken. On the following CI run from PyFFTW, I get an install of dask 1.2.2 with incompatible numpy 1.11.3:

https://ci.appveyor.com/project/hgomersall/pyfftw/builds/26051197/job/l5765hlr9342dv25#L152

@jakirkham

This comment has been minimized.

Copy link
Member

@jakirkham jakirkham commented Jul 18, 2019

@grlee77, if there are conda package issues, let's move those to the conda-forge feedstock.

Also would you be able to identify the ones with incorrect version constraints? That way we can hopefully get these in one pass. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.