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

PyData prototype testing #21

Open
eric-czech opened this issue Apr 13, 2020 · 0 comments
Open

PyData prototype testing #21

eric-czech opened this issue Apr 13, 2020 · 0 comments

Comments

@eric-czech
Copy link
Collaborator

Some thoughts from Jeff on testing frameworks:

Some common testing issues likely to come up are:

  • Dispatching: When relying on so many projects with varying levels of support for array duck typing, it will be important to test compatibility of the backends. In other words, if I expect a dask array at the end of a computation, do I really get one or does something coerce to numpy along the way?
    • Dask, numpy, and sparse are backends we'll likely find use for (possibly CuPy)
    • We have to be especially careful with Xarray since it has no __array_function__ implementation
      • This means that this code coerces inputs to numpy before the multiplication, so we have to make sure to use the Xarray API for any non-ufuncs:
          np.dot(
            xr.DataArray(da.array([[1,2,3]])), 
            xr.DataArray(da.array([[1,1], [2,2], [3,3]]))
          )
  • Validation: How do we validate our methods against Hail or PLINK?
  • Informative Diffs: Since a large portion of any GWAS pipeline is dedicated to QC, a very common output from each method is going to be a smaller version of the input (with samples/variants removed). Diff'ing an Xarray Dataset will be a frequent operation then because we'll want to know exactly how a result differs from expectation when a test fails
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant