-
Notifications
You must be signed in to change notification settings - Fork 164
Switch to (testing.)fast-array-utils #1921
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
base: main
Are you sure you want to change the base?
Conversation
flying-sheep
commented
Mar 17, 2025
- Closes #
- Tests added
- Release note added (or unnecessary)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1921 +/- ##
==========================================
- Coverage 86.87% 84.74% -2.14%
==========================================
Files 47 47
Lines 6912 6759 -153
==========================================
- Hits 6005 5728 -277
- Misses 907 1031 +124
🚀 New features to boost your workflow:
|
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.
In general the amount of
@pytest.mark.array_type(skip=Flags.Gpu | Flags.Disk)
is a lot (both this one specifically, and others like it). It seems like there is probably some sort of default we could have, no?
@@ -115,10 +107,10 @@ def adata_orig(adata_remote_orig_with_path: tuple[Path, AnnData]) -> AnnData: | |||
return orig | |||
|
|||
|
|||
@pytest.fixture(scope="session") | |||
@pytest.fixture |
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 might be a source of some slowdown
@@ -74,11 +66,11 @@ def simple_subset_func(request): | |||
return request.param | |||
|
|||
|
|||
@pytest.fixture(scope="session") | |||
@pytest.fixture |
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.
Ditto
|
||
assert init_hash == tokenize(adata) | ||
assert isinstance(subset.X, type(adata.X)) | ||
|
||
|
||
@IGNORE_SPARSE_EFFICIENCY_WARNING | ||
def test_set_scalar_subset_X(matrix_type, subset_func): | ||
adata = ad.AnnData(matrix_type(np.zeros((10, 10)))) | ||
@pytest.mark.array_type(skip={Flags.Disk, *CUPY_SPARSE, *DASK_SPARRAY}) |
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 this sort of thing will now run these tests on gpu whereas they did not before?
def test_not_set_subset_X_dask(matrix_type_no_gpu, subset_func): | ||
adata = ad.AnnData(matrix_type_no_gpu(asarray(sparse.random(20, 20)))) | ||
@pytest.mark.array_type(skip=Flags.Gpu | Flags.Disk) | ||
def test_not_set_subset_X_dask(array_type: ArrayType, subset_func) -> None: |
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.
In this case, this runs on sparse etc. as well, no?