diff --git a/.github/workflows/test-gpu-rpr.yml b/.github/workflows/test-gpu-rpr.yml new file mode 100644 index 00000000..6612aae1 --- /dev/null +++ b/.github/workflows/test-gpu-rpr.yml @@ -0,0 +1,60 @@ +name: GPU-CI-RAPIDS-PRE + +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..82fe3759 --- /dev/null +++ b/ci/environment_alpha.yml @@ -0,0 +1,11 @@ +name: rapids_singlecell_nightly +channels: + - rapidsai-nightly + - nvidia + - conda-forge +dependencies: + - rapids=25.06 + - python=3.13 + - cuda-version=12.8 + - zarr=3.0.6 + - 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..ad75e167 --- /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 upcoming release {pr}`368` {smaller}`S Dicks` 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" } 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)