Skip to content

Commit

Permalink
Merge pull request #150 from helicalAI/main
Browse files Browse the repository at this point in the history
Bring back skipped tests, fix seed for reproducible results in scGPT, include updates in README
  • Loading branch information
bputzeys authored Dec 11, 2024
2 parents 488294f + f5a3a12 commit 1551b01
Show file tree
Hide file tree
Showing 34 changed files with 569 additions and 221 deletions.
93 changes: 75 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
# Currently, the self-hosted runner uses a pre-installed version of mamba-ssm (v2.2.2). Using the latest version (v2.2.4) breaks the pip installation.
# TODO fix the installation of helical[mamba-ssm], and add it in the GitHub actions (CI/CD pipeline).
pip install .
# First download before tests as they make use of the downloaded files
Expand All @@ -29,41 +31,93 @@ jobs:
- name: Execute unittests
run: |
pytest --cov-report=html:html_cov --cov-branch --cov-report term --cov=helical ci/
CUDA_VISIBLE_DEVICES=-1 pytest --cov-report=html:html_cov --cov-branch --cov-report term --cov=helical ci/
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: html_cov/

integration-tests:
needs: tests
runs-on: self-hosted
env:
CUDA_VISIBLE_DEVICES: 0
steps:
- name: Checkout repository
uses: actions/checkout@v2

# Does not seem to work but would be nice to have
# - name: Pytest coverage comment
# uses: MishaKav/pytest-coverage-comment@main
# with:
# pytest-coverage-path: ./pytest-coverage.txt
# junitxml-path: ./pytest.xml
- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.11.8

# because jobs may not be run in the same order, we need to install the dependencies again
- name: Install helical
run: |
pip install .
# Required to get the data
- name: Download all files
run: |
python ci/download_all.py
- name: Execute Geneformer v1
run: |
python examples/run_models/run_geneformer.py ++model_name="gf-12L-30M-i2048"
python examples/run_models/run_geneformer.py ++model_name="gf-12L-30M-i2048" ++device="cuda"
- name: Fine-tune Geneformer v1
run: |
python examples/fine_tune_models/fine_tune_geneformer.py ++model_name="gf-12L-30M-i2048" ++device="cuda"
- name: Execute Geneformer v2
run: |
python examples/run_models/run_geneformer.py ++model_name="gf-12L-95M-i4096"
python examples/run_models/run_geneformer.py ++model_name="gf-12L-95M-i4096" ++device="cuda"
- name: Fine-tune Geneformer v2
run: |
python examples/fine_tune_models/fine_tune_geneformer.py ++model_name="gf-12L-30M-i2048" ++device="cuda"
- name: Execute scGPT
run: |
python examples/run_models/run_scgpt.py
python examples/run_models/run_scgpt.py ++device="cuda"
- name: Fine-tune scGPT
run: |
python examples/fine_tune_models/fine_tune_scgpt.py ++device="cuda"
- name: Execute UCE
run: |
python examples/run_models/run_uce.py
python examples/run_models/run_uce.py ++device="cuda"
- name: Fine-tune UCE
run: |
python examples/fine_tune_models/fine_tune_UCE.py ++device="cuda"
- name: Execute Hyena
run: |
python examples/run_models/run_hyena_dna.py ++device="cuda"
- name: Execute Hyena
run: |
python examples/fine_tune_models/fine_tune_hyena_dna.py ++device="cuda"
- name: Execute Helix-mRNA
run: |
python examples/run_models/run_helix_mrna.py ++device="cuda"
# - name: Execute Hyena
# run: |
# python examples/run_models/run_hyena_dna.py
- name: Fine-tune Helix-mRNA
run: |
python examples/fine_tune_models/fine_tune_helix_mrna.py ++device="cuda"
- name: Execute Mamba2-mRNA
run: |
python examples/run_models/run_mamba2_mrna.py ++device="cuda"
- name: Fine-tune Mamba2-mRNA
run: |
python examples/fine_tune_models/fine_tune_mamba2_mrna.py ++device="cuda"
- name: Execute benchmarking
run: |
Expand All @@ -73,6 +127,8 @@ jobs:
notebooks:
needs: tests
runs-on: self-hosted
env:
CUDA_VISIBLE_DEVICES: 0
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -82,10 +138,11 @@ jobs:
with:
python-version: 3.11.8

- name: Install dependencies
# because jobs may not be run in the same order, we need to install the dependencies again
- name: Install helical
run: |
pip install -r requirements-dev.txt
pip install .
- name: Reduce datasets to speedup checks
run: |
sed -i 's/train\[:65%\]/train\[:5%\]/g' ./examples/notebooks/Cell-Type-Annotation.ipynb
Expand All @@ -97,4 +154,4 @@ jobs:
- name: Run Notebooks
run: |
pytest --durations=0 --nbmake $(find ./examples/notebooks -name "*.ipynb" ! -name "Hyena*")
pytest --durations=0 --nbmake ./examples/notebooks/*.ipynb
112 changes: 92 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ permissions:
contents: write

jobs:
fresh-install:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.11.8

- name: Install dependencies
run: |
pip install .
tests:
runs-on: self-hosted
steps:
Expand All @@ -23,6 +38,8 @@ jobs:
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
# Currently, the self-hosted runner uses a pre-installed version of mamba-ssm (v2.2.2). Using the latest version (v2.2.4) breaks the pip installation.
# TODO fix the installation of helical[mamba-ssm], and add it in the GitHub actions (CI/CD pipeline).
pip install .
# First download before tests as they make use of the downloaded files
Expand All @@ -32,41 +49,93 @@ jobs:
- name: Execute unittests
run: |
pytest --cov-report=html:html_cov --cov-branch --cov-report term --cov=helical ci/
CUDA_VISIBLE_DEVICES=-1 pytest --cov-report=html:html_cov --cov-branch --cov-report term --cov=helical ci/
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: html_cov/

# Does not seem to work but would be nice to have
# - name: Pytest coverage comment
# uses: MishaKav/pytest-coverage-comment@main
# with:
# pytest-coverage-path: ./pytest-coverage.txt
# junitxml-path: ./pytest.xml
integration-tests:
needs: tests
runs-on: self-hosted
env:
CUDA_VISIBLE_DEVICES: 0
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: setup python
uses: actions/setup-python@v5
with:
python-version: 3.11.8

# because jobs may not be run in the same order, we need to install the dependencies again
- name: Install helical
run: |
pip install .
# Required to get the data
- name: Download all files
run: |
python ci/download_all.py
- name: Execute Geneformer v1
run: |
python examples/run_models/run_geneformer.py ++model_name="gf-12L-30M-i2048"
python examples/run_models/run_geneformer.py ++model_name="gf-12L-30M-i2048" ++device="cuda"
- name: Fine-tune Geneformer v1
run: |
python examples/fine_tune_models/fine_tune_geneformer.py ++model_name="gf-12L-30M-i2048" ++device="cuda"
- name: Execute Geneformer v2
run: |
python examples/run_models/run_geneformer.py ++model_name="gf-12L-95M-i4096"
python examples/run_models/run_geneformer.py ++model_name="gf-12L-95M-i4096" ++device="cuda"
- name: Fine-tune Geneformer v2
run: |
python examples/fine_tune_models/fine_tune_geneformer.py ++model_name="gf-12L-30M-i2048" ++device="cuda"
- name: Execute scGPT
run: |
python examples/run_models/run_scgpt.py
python examples/run_models/run_scgpt.py ++device="cuda"
- name: Fine-tune scGPT
run: |
python examples/fine_tune_models/fine_tune_scgpt.py ++device="cuda"
- name: Execute UCE
run: |
python examples/run_models/run_uce.py
python examples/run_models/run_uce.py ++device="cuda"
- name: Fine-tune UCE
run: |
python examples/fine_tune_models/fine_tune_UCE.py ++device="cuda"
- name: Execute Hyena
run: |
python examples/run_models/run_hyena_dna.py ++device="cuda"
# - name: Execute Hyena
# run: |
# python examples/run_models/run_hyena_dna.py
- name: Fine-tune Hyena
run: |
python examples/fine_tune_models/fine_tune_hyena_dna.py ++device="cuda"
- name: Execute Helix-mRNA
run: |
python examples/run_models/run_helix_mrna.py ++device="cuda"
- name: Fine-tune Helix-mRNA
run: |
python examples/fine_tune_models/fine_tune_helix_mrna.py ++device="cuda"
- name: Execute Mamba2-mRNA
run: |
python examples/run_models/run_mamba2_mrna.py ++device="cuda"
- name: Fine-tune Mamba2-mRNA
run: |
python examples/fine_tune_models/fine_tune_mamba2_mrna.py ++device="cuda"
- name: Execute benchmarking
run: |
Expand All @@ -76,6 +145,8 @@ jobs:
notebooks:
needs: tests
runs-on: self-hosted
env:
CUDA_VISIBLE_DEVICES: 0
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -85,10 +156,11 @@ jobs:
with:
python-version: 3.11.8

- name: Install dependencies
# because jobs may not be run in the same order, we need to install the dependencies again
- name: Install helical
run: |
pip install -r requirements-dev.txt
pip install .
- name: Reduce datasets to speedup checks
run: |
sed -i 's/train\[:65%\]/train\[:5%\]/g' ./examples/notebooks/Cell-Type-Annotation.ipynb
Expand All @@ -100,7 +172,7 @@ jobs:
- name: Run Notebooks
run: |
pytest --durations=0 --nbmake $(find ./examples/notebooks -name "*.ipynb" ! -name "Hyena*")
pytest --durations=0 --nbmake ./examples/notebooks/*.ipynb
release:
needs: notebooks
Expand All @@ -121,8 +193,8 @@ jobs:
- name: Extract version
id: get_version
run: |
# Extract version from setup.py (or adjust for your version file)
VERSION=$(python setup.py --version)
# Extract version from pyproject.toml (or adjust for your version file)
VERSION=$(grep "version =" pyproject.toml | cut -d '"' -f 2)
echo "::set-output name=version::$VERSION"
- name: Check if tag exists
Expand Down
3 changes: 0 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ build:
pre_build:
- "mkdir -p ./docs/notebooks"
- "cp ./examples/notebooks/*.ipynb ./docs/notebooks"
- "pip install -r ./docs/requirements.txt"
# Build the MkDocs site
# - "mike deploy --push --update-aliases 1.0 latest"

mkdocs:
configuration: mkdocs.yml
Expand Down
4 changes: 2 additions & 2 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
@software{allard_2024_13135902,
author = {Helical Team},
title = {helicalAI/helical: v0.0.1-alpha8},
title = {helicalAI/helical: v0.0.1a14},
month = nov,
year = 2024,
publisher = {Zenodo},
version = {0.0.1a6},
version = {0.0.1a14},
doi = {10.5281/zenodo.13135902},
url = {https://doi.org/10.5281/zenodo.13135902}
}
Loading

0 comments on commit 1551b01

Please sign in to comment.