From dc3d00b41b52450a85d7981ea164734c23fb1753 Mon Sep 17 00:00:00 2001 From: Intron7 Date: Thu, 15 May 2025 07:27:53 -0700 Subject: [PATCH 1/8] remove randomstate --- src/rapids_singlecell/preprocessing/_pca.py | 2 -- src/rapids_singlecell/preprocessing/_scrublet/pipeline.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/rapids_singlecell/preprocessing/_pca.py b/src/rapids_singlecell/preprocessing/_pca.py index c970dc7b..063fa99a 100644 --- a/src/rapids_singlecell/preprocessing/_pca.py +++ b/src/rapids_singlecell/preprocessing/_pca.py @@ -197,7 +197,6 @@ def pca( pca_func = PCA( n_components=n_comps, svd_solver=svd_solver, - random_state=random_state, output_type="numpy", ) X_pca = pca_func.fit_transform(X) @@ -207,7 +206,6 @@ def pca( pca_func = TruncatedSVD( n_components=n_comps, - random_state=random_state, algorithm=svd_solver, output_type="numpy", ) diff --git a/src/rapids_singlecell/preprocessing/_scrublet/pipeline.py b/src/rapids_singlecell/preprocessing/_scrublet/pipeline.py index 7f52ece0..370054c8 100644 --- a/src/rapids_singlecell/preprocessing/_scrublet/pipeline.py +++ b/src/rapids_singlecell/preprocessing/_scrublet/pipeline.py @@ -59,7 +59,7 @@ def truncated_svd( self._counts_obs_norm = self._counts_obs_norm.astype(cp.float32) self._counts_sim_norm = self._counts_sim_norm.astype(cp.float32) X_obs = _sparse_to_dense(self._counts_obs_norm) - svd = TruncatedSVD(n_components=n_prin_comps, random_state=random_state).fit(X_obs) + svd = TruncatedSVD(n_components=n_prin_comps).fit(X_obs) X_obs = svd.transform(X_obs) X_sim = svd.transform(_sparse_to_dense(self._counts_sim_norm)) self.set_manifold(X_obs, X_sim) @@ -80,7 +80,7 @@ def pca( self._counts_sim_norm = self._counts_sim_norm.astype(cp.float32) X_obs = _sparse_to_dense(self._counts_obs_norm) - pca = PCA(n_components=n_prin_comps, random_state=random_state).fit(X_obs) + pca = PCA(n_components=n_prin_comps).fit(X_obs) X_obs = pca.transform(X_obs) X_sim = pca.transform(_sparse_to_dense(self._counts_sim_norm)) self.set_manifold(X_obs, X_sim) From fb388e319dc62f6f87ecc2a5547b3203995c8ffb Mon Sep 17 00:00:00 2001 From: Intron7 Date: Thu, 15 May 2025 07:34:04 -0700 Subject: [PATCH 2/8] add rapids-alphatest --- .github/workflows/test-gpu-rpr.yml | 60 ++++++++++++++++++++++++++++++ ci/environment _alpha.yml | 10 +++++ docs/release-notes/0.12.4.md | 2 +- docs/release-notes/0.12.5.md | 15 ++++++++ 4 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test-gpu-rpr.yml create mode 100644 ci/environment _alpha.yml create mode 100644 docs/release-notes/0.12.5.md diff --git a/.github/workflows/test-gpu-rpr.yml b/.github/workflows/test-gpu-rpr.yml new file mode 100644 index 00000000..3b5757ce --- /dev/null +++ b/.github/workflows/test-gpu-rpr.yml @@ -0,0 +1,60 @@ +name: GPU-CI-DEV + +on: + push: + branches: [main] + pull_request: + types: + - labeled + - opened + - synchronize + +# Cancel the job if new commits are pushed +# https://stackoverflow.com/questions/66335225/how-to-cancel-previous-runs-in-the-pr-when-you-push-new-commitsupdate-the-curre +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: flying-sheep/check@v1 + with: + success: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'run-gpu-ci') }} + test: + name: GPU Tests + needs: check + runs-on: "cirun-aws-gpu--${{ github.run_id }}" + timeout-minutes: 30 + + defaults: + run: + shell: bash -el {0} + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Nvidia SMI sanity check + run: nvidia-smi + + - uses: mamba-org/setup-micromamba@v2 + with: + environment-file: ci/environment_alpha.yml + init-shell: >- + bash + cache-environment: true + post-cleanup: 'all' + + - name: Install rapids-singlecell + run: >- + pip install -e .[test] + "scanpy @ git+https://github.com/scverse/scanpy.git" + "anndata @ git+https://github.com/scverse/anndata.git" + + - name: Pip list + run: pip list + + - name: Run test + run: pytest diff --git a/ci/environment _alpha.yml b/ci/environment _alpha.yml new file mode 100644 index 00000000..a898a3be --- /dev/null +++ b/ci/environment _alpha.yml @@ -0,0 +1,10 @@ +name: rapids_singlecell-nightly +channels: + - rapidsai-nightly + - nvidia + - conda-forge +dependencies: + - rapids=25.04 + - python=3.13 + - cuda-version=12.8 + - cudnn diff --git a/docs/release-notes/0.12.4.md b/docs/release-notes/0.12.4.md index d495ec6a..88246b33 100644 --- a/docs/release-notes/0.12.4.md +++ b/docs/release-notes/0.12.4.md @@ -16,4 +16,4 @@ ```{rubric} Misc ``` -* Update notebooks for `anndata>0.11.4` {pr} `356` {smaller}`S Dicks` +* Update notebooks for `anndata>0.11.4` {pr}`356` {smaller}`S Dicks` diff --git a/docs/release-notes/0.12.5.md b/docs/release-notes/0.12.5.md new file mode 100644 index 00000000..342a1b95 --- /dev/null +++ b/docs/release-notes/0.12.5.md @@ -0,0 +1,15 @@ +### 0.12.5 {small}`the-future` + +```{rubric} Features +``` + +```{rubric} Performance +``` + +```{rubric} Bug fixes +``` +* remove `random_state` from cuml's `PCA` and `TruncatedSVD` {pr}`368` {smaller}`S Dicks` + +```{rubric} Misc +``` +* adds tests for RAPIDS upcomming release {pr}`368` {smaller}`S Dicks` From 3b279c512da2dcbf1b90ac15d1ac0bc5eff85d8c Mon Sep 17 00:00:00 2001 From: Intron7 Date: Thu, 15 May 2025 07:35:11 -0700 Subject: [PATCH 3/8] typo --- docs/release-notes/0.12.5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/release-notes/0.12.5.md b/docs/release-notes/0.12.5.md index 342a1b95..ad75e167 100644 --- a/docs/release-notes/0.12.5.md +++ b/docs/release-notes/0.12.5.md @@ -12,4 +12,4 @@ ```{rubric} Misc ``` -* adds tests for RAPIDS upcomming release {pr}`368` {smaller}`S Dicks` +* adds tests for RAPIDS upcoming release {pr}`368` {smaller}`S Dicks` From e6e0d2627200be8342749f1fe1e246c78a9b1baa Mon Sep 17 00:00:00 2001 From: Intron7 Date: Thu, 15 May 2025 07:35:45 -0700 Subject: [PATCH 4/8] rename test --- .github/workflows/test-gpu-rpr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-gpu-rpr.yml b/.github/workflows/test-gpu-rpr.yml index 3b5757ce..6612aae1 100644 --- a/.github/workflows/test-gpu-rpr.yml +++ b/.github/workflows/test-gpu-rpr.yml @@ -1,4 +1,4 @@ -name: GPU-CI-DEV +name: GPU-CI-RAPIDS-PRE on: push: From 882971f696d3f1dafa2e6d96457dc93a5ff0166c Mon Sep 17 00:00:00 2001 From: Intron7 Date: Thu, 15 May 2025 16:45:36 +0200 Subject: [PATCH 5/8] fix name --- ci/environment _alpha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/environment _alpha.yml b/ci/environment _alpha.yml index a898a3be..88fd4c27 100644 --- a/ci/environment _alpha.yml +++ b/ci/environment _alpha.yml @@ -1,4 +1,4 @@ -name: rapids_singlecell-nightly +name: rapids_singlecell_nightly channels: - rapidsai-nightly - nvidia From 08c3fe0b3b1fb7577cbf08b9bc2dba57b5d1f1fc Mon Sep 17 00:00:00 2001 From: Intron7 Date: Thu, 15 May 2025 16:50:11 +0200 Subject: [PATCH 6/8] rename file --- ci/{environment _alpha.yml => environment_alpha.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ci/{environment _alpha.yml => environment_alpha.yml} (100%) diff --git a/ci/environment _alpha.yml b/ci/environment_alpha.yml similarity index 100% rename from ci/environment _alpha.yml rename to ci/environment_alpha.yml From 863eca4de148bceb677cc2fae06b83094c4d3c5f Mon Sep 17 00:00:00 2001 From: Intron7 Date: Thu, 15 May 2025 17:02:20 +0200 Subject: [PATCH 7/8] correct version --- ci/environment_alpha.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/environment_alpha.yml b/ci/environment_alpha.yml index 88fd4c27..321c07bb 100644 --- a/ci/environment_alpha.yml +++ b/ci/environment_alpha.yml @@ -4,7 +4,7 @@ channels: - nvidia - conda-forge dependencies: - - rapids=25.04 + - rapids=25.06 - python=3.13 - cuda-version=12.8 - cudnn From 4fd1982e794c9f38625d8c1a117c6921b297642e Mon Sep 17 00:00:00 2001 From: Intron7 Date: Fri, 16 May 2025 11:10:26 +0200 Subject: [PATCH 8/8] update installer --- ci/environment_alpha.yml | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ci/environment_alpha.yml b/ci/environment_alpha.yml index 321c07bb..82fe3759 100644 --- a/ci/environment_alpha.yml +++ b/ci/environment_alpha.yml @@ -7,4 +7,5 @@ dependencies: - rapids=25.06 - python=3.13 - cuda-version=12.8 + - zarr=3.0.6 - cudnn diff --git a/pyproject.toml b/pyproject.toml index bb3ac0e4..0c3745ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "hatchling.build" [project] name = "rapids_singlecell" description = "running single cell analysis on Nvidia GPUs" -requires-python = ">=3.10, <3.13" +requires-python = ">=3.10, <3.14" license = { file = "LICENSE" } authors = [ { name = "Severin Dicks" } ] readme = { file = "README.md", content-type = "text/markdown" }