-
Notifications
You must be signed in to change notification settings - Fork 3
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
Running xarray unit tests with cubed #8
Comments
The xarray test suite isn't really set up to do this yet, so as a first step to get a rough impression of how it does I replaced Dask with Cubed in this branch: https://github.com/tomwhite/xarray/tree/cubed-unit-tests. Running the tests then gave: % pytest --color=yes | tee test-output.log
% grep FAILED test-output.log | cut -d' ' -f 4- | sort | uniq -c | sort -nr
318 TypeError: Only numeric dtypes are allowed in sum
206 AttributeError: 'IndexVariable' object has no attribute 'npartitions'
198 ValueError: missing object_codec for object array
179 ModuleNotFoundError: No module named 'dask'
92 AttributeError: 'Array' object has no attribute 'sum'
69 AssertionError: assert False
64 AttributeError: 'Array' object has no attribute 'reshape'. Did you mean: '_...
48 AttributeError: 'Array' object has no attribute 'ravel'
33 TypeError: Vectorized indexing is not supported
27 NameError: name 'da' is not defined
27 AssertionError: Left and right Dataset objects are not identical
25 NotImplementedError: cubed.apply_gufunc doesn't support allow_rechunk
19 AttributeError: 'Array' object has no attribute 'astype'. Did you mean: '_d...
15 TypeError: cannot pickle '_thread.lock' object
12 AttributeError: module 'cubed.array_api' has no attribute 'var'
10 AttributeError: 'Array' object has no attribute 'any'
... With a summary of:
A few comments on some of these:
|
Perhaps a good way to find these cases quickly would be to use a similar test-case-array-library-substitution trick like you've used here, but instead use the numpy minimal implementation of the array API mentioned here. |
Rerunning with all the changes (including cubed-dev/cubed#550) using https://github.com/tomwhite/xarray/tree/cubed-unit-tests-aug-2024:
This is an improvement: 5.8% of tests are failing, compared to 11.3% last October. |
Progress! But that's still a lot of errors 😕 Could you post the full output somewhere (e.g. you can collapse long output in markdown on github) so that we can look for the highest-priority failures to fix first? |
Here's the output log (it's got garbled characters in it for some reason, but should otherwise be OK): |
Interesting, thanks. There's a mixture of issues here, but your summary above still seems accurate.
That comes up a lot and should have been fixed already (to call
Presumably these are just an artifact of the of the you hacked these tests to always use cubed in stead of dask?
This is interesting and perhaps non-trivial for cubed.
This could be a bug in the namedarray code.
This could be a general issue with the chunkmanager dispatch
This seems like possibly a real bug in cubed. |
Reproduced in cubed-dev/cubed#556 |
To test the coverage and correctness of cubed-xarray we would ideally run the xarray unit test suite with the cubed chunk manager.
The text was updated successfully, but these errors were encountered: