-
Notifications
You must be signed in to change notification settings - Fork 22
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
Multi-GPU support with dask #179
Open
Intron7
wants to merge
100
commits into
main
Choose a base branch
from
dask_mg_support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 30 commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
17df571
add first functions
40167ca
add hvg part1
f4db387
Merge branch 'main' into dask_mg_support
Intron7 6526b42
Merge branch 'main' into dask_mg_support
Intron7 0cdb85d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 48b68f6
reset to main for hvg
Intron7 886cafa
add support for hvg
Intron7 d7bf01e
first pass pca
Intron7 b216890
pca update
Intron7 cdffd33
fix bug with csc matrix
Intron7 177afa1
add dask to docs
Intron7 dd1377c
add tests
Intron7 e254800
update names
Intron7 77b3c34
get docs to work
Intron7 36bebf9
remove client from sparse calc
Intron7 82cc22c
need dask for docs
Intron7 7ddde9b
Merge branch 'main' into dask_mg_support
Intron7 e33821f
add scale
Intron7 e1e6c19
int64 updates
Intron7 7da41e0
For main branch
Intron7 e676dbe
Merge branch 'main' into dask_mg_support
Intron7 b6f436f
test docs
Intron7 ef00052
Merge branch 'main' into dask_mg_support
Intron7 4b22562
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5ed8e68
fix import
Intron7 b879ea4
fix rebase
Intron7 e1d4e8b
Merge branch 'main' into dask_mg_support
Intron7 472ebb6
Merge branch 'main' into dask_mg_support
Intron7 4f45aef
Merge branch 'main' into dask_mg_support
Intron7 e0e22ad
Merge branch 'main' into dask_mg_support
Intron7 f002b9c
(fix): use `to_delayed` and `from_delayed` to submit gram matrix jobs…
ilan-gold a8b30d3
(fix): use `map_blocks` for job submission in `_get_target_sum_dask` …
ilan-gold b228345
(fix): remove `extract_partitions` from `mean`/`var` calculation (#221)
ilan-gold bbf71a5
Merge branch 'main' into dask_mg_support
Intron7 d7c34ce
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7390dd1
remove client from hvg
Intron7 7fedc07
remove client
Intron7 36a081e
remove client from scale
Intron7 6be8d9b
update to fast transform
Intron7 35da552
(fix): `normalize_total` -> `log1p` -> `pca` with sparse (#217)
ilan-gold 30ccfd3
fix taskgraph
Intron7 8cd60b4
(feat): use `map_blocks` in gram matrix calculation and and `mean_var…
ilan-gold edfdde0
Merge branch 'main' into dask_mg_support
Intron7 4bfd5a1
update pca
Intron7 8ddba49
use lambda
Intron7 dea8d3d
remove unused kernel
Intron7 a71116d
test removed kernel
Intron7 4a78e73
Merge branch 'main' into dask_mg_support
Intron7 523c862
Merge branch 'main' into dask_mg_support
Intron7 3680a68
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] f9f5661
Merge branch 'main' into dask_mg_support
Intron7 3a038e9
Merge branch 'main' into dask_mg_support
Intron7 9c0e09a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 845054d
Merge branch 'main' into dask_mg_support
Intron7 383bafb
add outside compute (#245)
Intron7 7ef0218
Merge branch 'main' into dask_mg_support
Intron7 98904fe
Merge branch 'main' into dask_mg_support
Intron7 1d192a5
Merge branch 'main' into dask_mg_support
Intron7 4f88abc
update utils for lazy compute
Intron7 727e15b
Merge branch 'dask_mg_support' of https://github.com/scverse/rapids_s…
Intron7 602f845
update utils
Intron7 f0d5124
Merge branch 'main' into dask_mg_support
Intron7 98441ea
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 118a37a
move test helpers
flying-sheep b6c2689
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 1b1023a
Merge branch 'main' into dask_mg_support
Intron7 9235c3e
Merge branch 'main' into dask_mg_support
Intron7 7315d99
Merge branch 'main' into dask_mg_support
Intron7 6a4394d
Merge branch 'main' into dask_mg_support
Intron7 7945775
Merge branch 'main' into dask_mg_support
Intron7 0201658
Merge branch 'main' into dask_mg_support
Intron7 ea57084
update typing
Intron7 13760b7
update normalize
Intron7 b9e4931
go back to lambda
Intron7 9308e21
slim down tests
Intron7 f8d6269
run tests on rapids-24.08
Intron7 65f941a
compress hvg tests
Intron7 17ca2ef
remove .todelayed
Intron7 06ce8e5
remove dask.delayed
Intron7 6d94835
update qc
Intron7 b733ab3
Update src/rapids_singlecell/preprocessing/_pca.py
Intron7 75bbbb8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 42ac1f9
Merge branch 'main' into dask_mg_support
Intron7 c02b0e0
Merge branch 'main' into dask_mg_support
Intron7 d2d2e45
Update src/rapids_singlecell/preprocessing/_scale.py
Intron7 d3421ca
add error
Intron7 8b32156
update tree pca
Intron7 bb10cda
Update src/rapids_singlecell/preprocessing/_scale.py
Intron7 1ae74d7
add note
Intron7 38e4ad0
dask import
Intron7 9755641
update qc names
Intron7 fe2aa20
Merge branch 'main' into dask_mg_support
Intron7 5fd5a97
update
Intron7 af1faf5
update _check_gpu_X
Intron7 7366200
update docs
Intron7 d1a6344
docs update
Intron7 fb8c825
Merge branch 'main' into dask_mg_support
Intron7 c65585d
make sure dtype is correct PCA
Intron7 b7974f9
Merge branch 'main' into dask_mg_support
Intron7 e7a1118
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from __future__ import annotations | ||
|
||
import cupy as cp | ||
from cupyx.scipy.sparse import csr_matrix | ||
|
||
try: | ||
from dask.array import Array as DaskArray | ||
except ImportError: | ||
|
||
class DaskArray: | ||
pass | ||
|
||
|
||
try: | ||
from dask.distributed import Client as DaskClient | ||
except ImportError: | ||
|
||
class DaskClient: | ||
pass | ||
Intron7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
def _get_dask_client(client=None): | ||
from dask.distributed import default_client | ||
|
||
if client is None or not isinstance(client, DaskClient): | ||
return default_client() | ||
return client | ||
Intron7 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
|
||
def _meta_dense(dtype): | ||
return cp.zeros([0], dtype=dtype) | ||
|
||
|
||
def _meta_sparse(dtype): | ||
return csr_matrix(cp.array((1.0,), dtype=dtype)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should
dask[array,distributed]
anddask-cuda
be added to thepyproject-toml
indask
section?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 is just for building the docs. I think cuml installs all the dask dependencies
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 think it's generally best practice still to install them directly if you use them.
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.
These should be added to the dependencies.
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 agree with you. I dont want to run into issue with rapids and the conda installation.