-
Notifications
You must be signed in to change notification settings - Fork 28
add score_genes support for Dask #408
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good! I think csc support would be very easy and a few minor simplifications possible, otherwise great!
if isinstance(X._meta, csc_matrix_cpu): | ||
pass | ||
meta = _meta_sparse if isinstance(X._meta, csr_matrix_cpu) else _meta_dense | ||
X = X.map_blocks(X_to_GPU, meta=meta(X.dtype)) | ||
elif isinstance(X._meta, csr_matrix_gpu) or isinstance(X._meta, cp.ndarray): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if isinstance(X._meta, csc_matrix_cpu): | |
pass | |
meta = _meta_sparse if isinstance(X._meta, csr_matrix_cpu) else _meta_dense | |
X = X.map_blocks(X_to_GPU, meta=meta(X.dtype)) | |
elif isinstance(X._meta, csr_matrix_gpu) or isinstance(X._meta, cp.ndarray): | |
pass | |
if isinstance(X._meta, csc_matrix_cpu | csr_matrix_gpu | cp.ndarray): | |
pass |
return cp.vstack([mean, var]) | ||
return cp.stack([mean, var], axis=1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m curious: why the axis switch? is this more local?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works the other for some reason doesn't
I have csc support for non dask arrays. But for the moment I don't support dask csc in general also because of cupy being weird about it. |
No description provided.