Conversation
|
cc @shoyer |
|
Just to summarize the test failures we're seeing:
|
|
We also support CuPy sparse matrices for similar reasons, which likely have similar issues |
|
Thanks @jrbourbeau , you beat me to it on working this PR. 😄
For this, we'll also want to check for Line 524 in 5273e73
Seems like we'll need to special-case this as well in |
jakirkham
left a comment
There was a problem hiding this comment.
Some suggestions for CuPy sparse matrices
| """ | ||
| from .base import is_dask_collection | ||
|
|
||
| is_duck_array = hasattr(x, "__array_function__") or hasattr(x, "__array_ufunc__") |
There was a problem hiding this comment.
@pentschev do you have thoughts on this formulation?
There was a problem hiding this comment.
xref-ing @pentschev's earlier comment #7321 (comment)
There was a problem hiding this comment.
The duck arrays I'm aware of (i.e. NumPy, sparse, cupy, pint, unyt) all will result in is_duck_array being True. That said, I can't be 100% certain that this covers all array-like libraries that are used with Dask today. Perhaps this is a good opportunity for us to specify the conditions for which an array library will work with Dask Array. Xarray has a nice documentation section on this http://xarray.pydata.org/en/stable/internals.html#internals-duck-arrays topic
|
If there are no further comments I'll propose we include this in the release tomorrow. @jakirkham @pentschev could I ask one of you to run the |
I agree with changes here and tested it locally, the tests pass with the exception of those I mentioned in #7324 . I also applied the patch to a start just after #6738 and by doing so all tests would pass, so from the CuPy side I thing we're good. Thanks @jrbourbeau for working on this! 😄 |
|
Thanks for working on this -- yes, this is important to keep Xarray working with dask :) My only thought is that the name |
I do not oppose doing that, and semantically agree with it. I'm only wondering if renaming that may cause confusion with people, we also have other utility function such as |
|
Given this is a bug fix we are trying to get in before a release and I don’t think this function is intended for usage outside Dask, maybe we can punt on function renaming and track that in a new issue? |
+1. @shoyer thanks for bringing this terminology issue up -- I agree there's a mismatch between the |
|
Thanks all for reviewing! Your feedback was very useful |
|
Thanks James! 😄 |
|
Thanks! I agree, this might be clarified well just by updating the
docstring for this helper function.
…On Fri, Mar 5, 2021 at 9:02 AM jakirkham ***@***.***> wrote:
Thanks James! 😄
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7321 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJJFVS3DDSKGHAK7EKYRY3TCEFCFANCNFSM4YTT3AEQ>
.
|
|
Filed issue ( #7327 ) on that point. Also noted updating the docstring. Please feel free to add anything else there 🙂 |
* upstream/master: (43 commits) bump version to 2021.03.0 Bump minimum version of distributed (dask#7328) Fix `percentiles_summary` with `dask_cudf` (dask#7325) Temporarily revert recent Array.__setitem__ updates (dask#7326) Blockwise.clone (dask#7312) NEP-35 duck array update (dask#7321) Don't allow setting `.name` for array (dask#7222) Use nearest interpolation for creating percentiles of integer input (dask#7305) Test `exp` with CuPy arrays (dask#7322) Check that computed chunks have right size and dtype (dask#7277) pytest.mark.flaky (dask#7319) Contributing docs: add note to pull the latest git tags before pip installing Dask (dask#7308) Support for Python 3.9 (dask#7289) Add broadcast-based merge implementation (dask#7143) Add split_every to graph_manipulation (dask#7282) Typo in optimize docs (dask#7306) dask.graph_manipulation support for xarray.Dataset (dask#7276) Add plot width and height support for Bokeh 2.3.0 (dask#7297) Add numpy functions tri, triu_indices, triu_indices_from, tril_indices, tril_indices_from (dask#6997) Remove "cleanup" task in dataframe on-disk shuffle. The partd directory (dask#7260) ...
This tests out adding an
__array_function__condition to ouris_arraylikecheck (xref #7263 (comment)). Let's see if CI passescc @pentschev @jakirkham
black dask/flake8 dask