-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathtest_benchmark_collection_models.yml
More file actions
159 lines (134 loc) · 4.91 KB
/
test_benchmark_collection_models.yml
File metadata and controls
159 lines (134 loc) · 4.91 KB
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
name: Benchmark Collection
on:
push:
branches:
- main
- 'release*'
pull_request:
branches:
- main
merge_group:
workflow_dispatch:
schedule:
- cron: '48 4 * * *'
jobs:
cpp:
name: Benchmark Collection CPP
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: [ "3.14" ]
extract_subexpressions: ["true", "false"]
env:
AMICI_EXTRACT_CSE: ${{ matrix.extract_subexpressions }}
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v5
with:
fetch-depth: 20
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies
- run: echo "${HOME}/.local/bin/" >> $GITHUB_PATH
# install AMICI
- name: Create AMICI sdist
run: pip3 install build && cd python/sdist && python3 -m build --sdist
- name: Install AMICI sdist
run: |
pip3 install --user petab[vis] && \
AMICI_PARALLEL_COMPILE="" pip3 install -v --user \
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1)[petab,test,vis,jax]
- name: Install test dependencies
run: |
python3 -m pip uninstall -y petab && python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@main \
&& python3 -m pip install -U sympy \
&& python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git@main
- name: Download benchmark collection
run: |
pip install git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master#subdirectory=src/python
- name: Run tests
env:
AMICI_PARALLEL_COMPILE: ""
run: |
pytest tests/benchmark_models/test_petab_benchmark.py \
--durations=10 \
--cov=amici \
--cov-report=xml:"coverage_py.xml" \
--cov-append \
- name: Codecov Python
if: (github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev') && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage_py.xml
flags: python
fail_ci_if_error: true
verbose: true
# collect & upload results
- name: Aggregate results
run: |
python3 tests/benchmark_models/evaluate_benchmark.py
- uses: actions/upload-artifact@v5
with:
name: computation-times-${{ matrix.python-version }}-${{ matrix.extract_subexpressions }}
path: |
tests/benchmark_models/computation_times.csv
tests/benchmark_models/computation_times.png
jax:
name: Benchmark Collection JAX
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: [ "3.14" ]
extract_subexpressions: ["false"]
env:
AMICI_EXTRACT_CSE: ${{ matrix.extract_subexpressions }}
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v5
with:
fetch-depth: 20
- name: Install apt dependencies
uses: ./.github/actions/install-apt-dependencies
- run: echo "${HOME}/.local/bin/" >> $GITHUB_PATH
- name: Create AMICI sdist
run: pip3 install build && cd python/sdist && python3 -m build --sdist
- name: Install AMICI sdist
run: |
pip3 install --user petab[vis] && \
pip3 install -v --user \
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1)[petab,test,vis,jax]
- name: Install test dependencies
run: |
python3 -m pip uninstall -y petab && python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@main \
&& python3 -m pip install -U sympy \
&& python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git@amici100
- run: pip uninstall -y diffrax && pip install git+https://github.com/patrick-kidger/diffrax@dev # TODO FIXME https://github.com/patrick-kidger/diffrax/issues/654 + event dirs
- name: Download benchmark collection
run: |
pip install git+https://github.com/Benchmarking-Initiative/Benchmark-Models-PEtab.git@master#subdirectory=src/python
- name: Run JAX tests
env:
AMICI_PARALLEL_COMPILE: ""
run: |
pytest tests/benchmark_models/test_petab_benchmark_jax.py \
--durations=10 \
--cov=amici \
--cov-report=xml:"coverage_py.xml" \
--cov-append
- name: Codecov Python
if: (github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev') && github.actor != 'dependabot[bot]'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage_py.xml
flags: python
fail_ci_if_error: true
verbose: true