Skip to content

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

Merged
merged 4 commits into from
Jul 29, 2025
Merged

add score_genes support for Dask #408

merged 4 commits into from
Jul 29, 2025

Conversation

Intron7
Copy link
Member

@Intron7 Intron7 commented Jul 17, 2025

No description provided.

@Intron7 Intron7 added the run-gpu-ci runs GPU CI label Jul 17, 2025
@Intron7 Intron7 linked an issue Jul 17, 2025 that may be closed by this pull request
@Intron7 Intron7 requested a review from flying-sheep July 17, 2025 11:29
@github-actions github-actions bot removed the run-gpu-ci runs GPU CI label Jul 17, 2025
Copy link
Member

@flying-sheep flying-sheep left a 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!

Comment on lines 94 to 97
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

Comment on lines -168 to +165
return cp.vstack([mean, var])
return cp.stack([mean, var], axis=1)
Copy link
Member

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?

Copy link
Member Author

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

@Intron7
Copy link
Member Author

Intron7 commented Jul 27, 2025

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.

@Intron7 Intron7 added the run-gpu-ci runs GPU CI label Jul 29, 2025
@Intron7 Intron7 enabled auto-merge (squash) July 29, 2025 15:40
@github-actions github-actions bot removed the run-gpu-ci runs GPU CI label Jul 29, 2025
@Intron7 Intron7 added the run-gpu-ci runs GPU CI label Jul 29, 2025
@github-actions github-actions bot removed the run-gpu-ci runs GPU CI label Jul 29, 2025
@Intron7 Intron7 merged commit d6d55ac into main Jul 29, 2025
13 of 16 checks passed
@Intron7 Intron7 deleted the score_genes_dask branch July 29, 2025 15:59
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

Successfully merging this pull request may close these issues.

[FEA] Dask Support for tl.score_genes
2 participants