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

Sparse tests failing on master #3265

Closed
max-sixty opened this issue Aug 26, 2019 · 6 comments
Closed

Sparse tests failing on master #3265

max-sixty opened this issue Aug 26, 2019 · 6 comments

Comments

@max-sixty
Copy link
Collaborator

https://dev.azure.com/xarray/xarray/_build/results?buildId=695

=================================== FAILURES ===================================
_______________________ TestSparseVariable.test_unary_op _______________________

self = <xarray.tests.test_sparse.TestSparseVariable object at 0x7f24f0b21b70>

    def test_unary_op(self):
>       sparse.utils.assert_eq(-self.var.data, -self.data)
E       AttributeError: module 'sparse' has no attribute 'utils'

xarray/tests/test_sparse.py:285: AttributeError
___________________ TestSparseVariable.test_univariate_ufunc ___________________

self = <xarray.tests.test_sparse.TestSparseVariable object at 0x7f24ebc2bb38>

    def test_univariate_ufunc(self):
>       sparse.utils.assert_eq(np.sin(self.data), xu.sin(self.var).data)
E       AttributeError: module 'sparse' has no attribute 'utils'

xarray/tests/test_sparse.py:290: AttributeError
___________________ TestSparseVariable.test_bivariate_ufunc ____________________

self = <xarray.tests.test_sparse.TestSparseVariable object at 0x7f24f02a7e10>

    def test_bivariate_ufunc(self):
>       sparse.utils.assert_eq(np.maximum(self.data, 0), xu.maximum(self.var, 0).data)
E       AttributeError: module 'sparse' has no attribute 'utils'

xarray/tests/test_sparse.py:293: AttributeError
________________________ TestSparseVariable.test_pickle ________________________

self = <xarray.tests.test_sparse.TestSparseVariable object at 0x7f24f04f2c50>

    def test_pickle(self):
        v1 = self.var
        v2 = pickle.loads(pickle.dumps(v1))
>       sparse.utils.assert_eq(v1.data, v2.data)
E       AttributeError: module 'sparse' has no attribute 'utils'

xarray/tests/test_sparse.py:307: AttributeError

Any ideas?

@max-sixty max-sixty changed the title Parse tests failing on master Sparse tests failing on master Aug 26, 2019
@shoyer
Copy link
Member

shoyer commented Aug 26, 2019

It looks like sparse just made a release 🎉

We should refactor to avoid using the internal sparse function sparse.utils.assert_eq in favor of using public APIs.

@dcherian
Copy link
Contributor

Doesn't seem like there's anything in the public API that we can use: https://sparse.pydata.org/en/latest/generated/sparse.html

@shoyer
Copy link
Member

shoyer commented Aug 26, 2019

For our purposes, I think it would be enough to verify that both objects are sparse arrays and the dense arrays match exactly.

@shoyer
Copy link
Member

shoyer commented Aug 26, 2019

It is probably also worth removing a bunch of "xfail" marks that are resolved by the sparse upgrade.

@dcherian
Copy link
Contributor

It is probably also worth removing a bunch of "xfail" marks that are resolved by the sparse upgrade.

I can do this is #3255

@dcherian
Copy link
Contributor

Closed by #3255

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

No branches or pull requests

3 participants