From d6d9191b164b6a8c77874bbf7788d517c3c6738f Mon Sep 17 00:00:00 2001 From: Martin Kim <46072231+martinkim0@users.noreply.github.com> Date: Mon, 8 Jul 2024 13:39:57 -0700 Subject: [PATCH 1/2] ci: fix release workflow (#292) --- .github/workflows/release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e261c83..4a2a670 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,6 @@ jobs: tag-release: name: Tag release runs-on: ubuntu-latest - needs: validate-tag # If you don't set an input tag, it's a dry run (no uploads). if: ${{ inputs.tag }} permissions: From bd61ebfbdb16108d70334374c49d68cf97835539 Mon Sep 17 00:00:00 2001 From: Martin Kim <46072231+martinkim0@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:36:59 -0700 Subject: [PATCH 2/2] ci: refactor run notebook workflows (#295) * ci: fix release workflow * ci: refactor run notebook workflows --- .github/workflows/run_linux_cuda.yml | 104 ------------------ .github/workflows/run_notebook.yaml | 40 +++++++ .github/workflows/run_notebook_all.yaml | 57 ++++++++++ ...ranch.yml => run_notebook_individual.yaml} | 68 ++---------- 4 files changed, 108 insertions(+), 161 deletions(-) delete mode 100644 .github/workflows/run_linux_cuda.yml create mode 100644 .github/workflows/run_notebook.yaml create mode 100644 .github/workflows/run_notebook_all.yaml rename .github/workflows/{run_linux_cuda_branch.yml => run_notebook_individual.yaml} (50%) diff --git a/.github/workflows/run_linux_cuda.yml b/.github/workflows/run_linux_cuda.yml deleted file mode 100644 index 0073d22..0000000 --- a/.github/workflows/run_linux_cuda.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: Run notebook (Linux, CUDA) - -on: - workflow_dispatch: - inputs: - notebook-path: - description: Path to the notebook to run - required: true - type: choice - options: # not including R tutorials currently - - atac/PeakVI.ipynb - - atac/PoissonVI.ipynb - - atac/scbasset_batch.ipynb - - atac/scbasset.ipynb - - dev/data_tutorial.ipynb - - dev/model_user_guide.ipynb - - dev/module_user_guide.ipynb - - hub/minification.ipynb - - hub/scvi_hub_intro_and_download.ipynb - - hub/scvi_hub_upload_and_large_files.ipynb - - multimodal/cite_scrna_integration_w_totalVI.ipynb - - multimodal/MultiVI_tutorial.ipynb - - multimodal/totalVI_reference_mapping.ipynb - - multimodal/totalVI.ipynb - - quick_start/api_overview.ipynb - - quick_start/data_loading.ipynb - - scrna/amortized_lda.ipynb - - scrna/AutoZI_tutorial.ipynb - - scrna/cellassign_tutorial.ipynb - - scrna/contrastiveVI_tutorial.ipynb - - scrna/harmonization.ipynb - - scrna/linear_decoder.ipynb - - scrna/query_hlca_knn.ipynb - - scrna/scanvi_fix.ipynb - - scrna/scarches_scvi_tools.ipynb - - scrna/scVI_DE_worm.ipynb - - scrna/seed_labeling.ipynb - - scrna/tabula_muris.ipynb - - scrna/MrVI_tutorial.ipynb - - spatial/cell2location_lymph_node_spatial_tutorial.ipynb - - spatial/DestVI_tutorial.ipynb - - spatial/gimvi_tutorial.ipynb - - spatial/stereoscope_heart_LV_tutorial.ipynb - - spatial/tangram_scvi_tools.ipynb - - tuning/autotune_new_model.ipynb - - tuning/autotune_scvi.ipynb - - python-version: - description: Python version - required: true - default: "3.11" - type: choice - options: - - "3.11" - - "3.10" - - "3.9" - - cuda-version: - description: CUDA version - required: true - default: "11" - type: choice - options: - - "11" - - scvi-tools-version: - description: scvi-tools version (latest, stable, or semver) - required: true - default: "latest" - type: string - -jobs: - docker: - runs-on: [self-hosted, Linux, X64, CUDA] - - container: - image: scverse/scvi-tools:py${{ inputs.python-version }}-cu${{ inputs.cuda-version }}-tutorials-${{ inputs.scvi-tools-version }} - options: --user root --gpus all - - timeout-minutes: 600 # lenient timeout for scbasset tutorial - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Python kernel - run: | - python -m ipykernel install - - - name: Run notebook - run: | - python -m jupyter nbconvert --execute --inplace ${{ inputs.notebook-path }} - - - name: Submit PR changes - uses: peter-evans/create-pull-request@v5 - with: - commit-message: Rerun ${{ inputs.notebook-path }} - title: Automated update for ${{ inputs.notebook-path }} - branch: update-${{ inputs.notebook-path }} - body: | - Update ${{ inputs.notebook-path }}: - - Python version: ${{ inputs.python-version }} - - CUDA version: ${{ inputs.cuda-version }} - - scvi-tools version: ${{ inputs.scvi-tools-version }} diff --git a/.github/workflows/run_notebook.yaml b/.github/workflows/run_notebook.yaml new file mode 100644 index 0000000..f16e536 --- /dev/null +++ b/.github/workflows/run_notebook.yaml @@ -0,0 +1,40 @@ +name: run notebook + +on: + workflow_call: + inputs: + notebook: + description: "Path to the notebook to run" + required: true + type: string + version: + description: "latest/stable/semver/branch" + required: true + type: string + +jobs: + notebook: + runs-on: [self-hosted, Linux, X64, CUDA] + + container: + image: ghcr.io/scverse/scvi-tools:py3.11-cu12-${{ inputs.version }}-tutorials + options: --user root --gpus all + + timeout-minutes: 600 # lenient timeout for scbasset tutorial + + steps: + - uses: actions/checkout@v4 + + - name: Install Python kernel + run: | + python -m ipykernel install + + - name: Run notebook + run: | + python -m jupyter nbconvert --execute --inplace ${{ inputs.notebook }} + + - uses: peter-evans/create-pull-request@v5 + with: + commit-message: run ${{ inputs.notebook }} + title: automated update for ${{ inputs.notebook }} + branch: update-${{ inputs.notebook }} diff --git a/.github/workflows/run_notebook_all.yaml b/.github/workflows/run_notebook_all.yaml new file mode 100644 index 0000000..52cc8cd --- /dev/null +++ b/.github/workflows/run_notebook_all.yaml @@ -0,0 +1,57 @@ +name: run notebook (all) + +on: + workflow_dispatch: + inputs: + version: + description: "latest/stable/semver/branch" + required: true + type: string + +jobs: + notebook: + strategy: + matrix: + notebook: + - atac/PeakVI.ipynb + - atac/PoissonVI.ipynb + - atac/scbasset_batch.ipynb + - atac/scbasset.ipynb + - dev/data_tutorial.ipynb + - dev/model_user_guide.ipynb + - dev/module_user_guide.ipynb + - hub/cellxgene_census_model.ipynb + - hub/minification.ipynb + - hub/scvi_hub_intro_and_download.ipynb + - hub/scvi_hub_upload_and_large_files.ipynb + - multimodal/cite_scrna_integration_w_totalVI.ipynb + - multimodal/MultiVI_tutorial.ipynb + - multimodal/totalVI_reference_mapping.ipynb + - multimodal/totalVI.ipynb + - quick_start/api_overview.ipynb + - quick_start/data_loading.ipynb + - scrna/amortized_lda.ipynb + - scrna/AutoZI_tutorial.ipynb + - scrna/cellassign_tutorial.ipynb + - scrna/contrastiveVI_tutorial.ipynb + - scrna/harmonization.ipynb + - scrna/linear_decoder.ipynb + - scrna/query_hlca_knn.ipynb + - scrna/scanvi_fix.ipynb + - scrna/scarches_scvi_tools.ipynb + - scrna/scVI_DE_worm.ipynb + - scrna/seed_labeling.ipynb + - scrna/tabula_muris.ipynb + - scrna/MrVI_tutorial.ipynb + - spatial/cell2location_lymph_node_spatial_tutorial.ipynb + - spatial/DestVI_tutorial.ipynb + - spatial/gimvi_tutorial.ipynb + - spatial/stereoscope_heart_LV_tutorial.ipynb + - spatial/tangram_scvi_tools.ipynb + - tuning/autotune_new_model.ipynb + - tuning/autotune_scvi.ipynb + + uses: ./.github/workflows/run_notebook.yaml + with: + notebook: ${{ matrix.notebook }} + version: ${{ inputs.version }} diff --git a/.github/workflows/run_linux_cuda_branch.yml b/.github/workflows/run_notebook_individual.yaml similarity index 50% rename from .github/workflows/run_linux_cuda_branch.yml rename to .github/workflows/run_notebook_individual.yaml index 18c0912..40b1c1d 100644 --- a/.github/workflows/run_linux_cuda_branch.yml +++ b/.github/workflows/run_notebook_individual.yaml @@ -1,10 +1,10 @@ -name: Run notebook (Linux, CUDA, branch) +name: run notebook (individual) on: workflow_dispatch: inputs: - notebook-path: - description: Path to the notebook to run + notebook: + description: "Path to the notebook to run" required: true type: choice options: # not including R tutorials currently @@ -15,6 +15,7 @@ on: - dev/data_tutorial.ipynb - dev/model_user_guide.ipynb - dev/module_user_guide.ipynb + - hub/cellxgene_census_model.ipynb - hub/minification.ipynb - hub/scvi_hub_intro_and_download.ipynb - hub/scvi_hub_upload_and_large_files.ipynb @@ -44,61 +45,14 @@ on: - spatial/tangram_scvi_tools.ipynb - tuning/autotune_new_model.ipynb - tuning/autotune_scvi.ipynb - - python-version: - description: Python version - required: true - default: "3.11" - type: choice - options: - - "3.11" - - "3.10" - - "3.9" - - cuda-version: - description: CUDA version - required: true - default: "11" - type: choice - options: - - "11" - - branch-name: - description: scvi-tools branch to run on + version: + description: "latest/stable/semver/branch" required: true - default: "main" type: string jobs: - docker: - runs-on: [self-hosted, Linux, X64, CUDA] - - container: - image: scverse/scvi-tools:py${{ inputs.python-version }}-cu${{ inputs.cuda-version }}-tutorials-${{ inputs.branch-name}} - options: --user root --gpus all - - timeout-minutes: 600 # lenient timeout for scbasset tutorial - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Python kernel - run: | - python -m ipykernel install - - - name: Run notebook - run: | - python -m jupyter nbconvert --execute --inplace ${{ inputs.notebook-path }} - - - name: Submit PR with changes - uses: peter-evans/create-pull-request@v5 - with: - commit-message: Execute ${{ inputs.notebook-path }} - title: Automated update for ${{ inputs.notebook-path }} - branch: update-${{ inputs.notebook-path }} - body: | - Update ${{ inputs.notebook-path }}: - - Python version: ${{ inputs.python-version }} - - CUDA version: ${{ inputs.cuda-version }} - - scvi-tools branch: ${{ inputs.branch-name }} + notebook: + uses: ./.github/workflows/run_notebook.yaml + with: + notebook: ${{ inputs.notebook }} + version: ${{ inputs.version }}