-
Notifications
You must be signed in to change notification settings - Fork 7
144 lines (116 loc) · 4.45 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: CI Pipeline
on:
pull_request:
branches:
- main
jobs:
tests:
runs-on: [self-hosted, ubuntu-24.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 -r requirements-dev.txt
pip install .
- name: Execute unittests
run: |
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:
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
- name: Install dependencies
run: |
pip install -r requirements-dev.txt
# pip install .[mamba-ssm]
pip install .
pip install mamba-ssm==2.2.2
causal-conv1d==1.4.0
# First download before tests as they make use of the downloaded files
- name: Download all files
run: |
python ci/download_all.py
- name: Fine-tune Geneformer v2
run: |
python examples/fine_tune_models/fine_tune_geneformer.py ++model_name="gf-12L-30M-i2048"
- name: Execute scGPT
run: |
python examples/run_models/run_scgpt.py
- name: Fine-tune scGPT
run: |
python examples/fine_tune_models/fine_tune_scgpt.py
- name: Execute UCE
run: |
python examples/run_models/run_uce.py
- name: Fine-tune UCE
run: |
python examples/fine_tune_models/fine_tune_UCE.py
- name: Execute Hyena
run: |
python examples/run_models/run_hyena_dna.py
- name: Execute Hyena
run: |
python examples/fine_tune_models/fine_tune_hyena_dna.py
- name: Execute Helix-mRNA
run: |
python examples/run_models/run_helix_mrna.py
- name: Fine-tune Helix-mRNA
run: |
python examples/fine_tune_models/fine_tune_helix_mrna.py
- name: Execute Mamba2-mRNA
run: |
python examples/run_models/run_mamba2_mrna.py
- name: Fine-tune Mamba2-mRNA
run: |
python examples/fine_tune_models/fine_tune_mamba2_mrna.py
- name: Execute benchmarking
run: |
pip install scanorama
python examples/run_benchmark.py
notebooks:
needs: tests
runs-on: self-hosted
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 -r requirements-dev.txt
- name: Reduce datasets to speedup checks
run: |
sed -i 's/train\[:65%\]/train\[:5%\]/g' ./examples/notebooks/Cell-Type-Annotation.ipynb
sed -i 's/train\[70%:\]/train\[5%:7%\]/g' ./examples/notebooks/Cell-Type-Annotation.ipynb
sed -i 's/get_anndata_from_hf_dataset(ds\[\\"train\\"\])/get_anndata_from_hf_dataset(ds\[\\"train\\"\])[:100]/g' ./examples/notebooks/Cell-Type-Classification-Fine-Tuning.ipynb
sed -i 's/get_anndata_from_hf_dataset(ds\[\\"test\\"\])/get_anndata_from_hf_dataset(ds\[\\"test\\"\])[:10]/g' ./examples/notebooks/Cell-Type-Classification-Fine-Tuning.ipynb
sed -i 's/list(np.array(train_dataset.obs\[\\"LVL1\\"].tolist()))/list(np.array(train_dataset.obs\[\\"LVL1\\"].tolist()))[:100]/g' ./examples/notebooks/Cell-Type-Classification-Fine-Tuning.ipynb
sed -i 's/list(np.array(test_dataset.obs\[\\"LVL1\\"].tolist()))/list(np.array(test_dataset.obs\[\\"LVL1\\"].tolist()))[:10]/g' ./examples/notebooks/Cell-Type-Classification-Fine-Tuning.ipynb
- name: Run Notebooks
run: |
pytest --durations=0 --nbmake ./examples/notebooks/*.ipynb