-
Notifications
You must be signed in to change notification settings - Fork 31
74 lines (62 loc) · 2.01 KB
/
test_benchmark_collection_models.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
name: Benchmark Collection
on:
push:
branches:
- develop
- master
pull_request:
branches:
- master
- develop
merge_group:
workflow_dispatch:
schedule:
- cron: '48 4 * * *'
jobs:
build:
name: Benchmark Collection
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: [ "3.9" ]
extract_subexpressions: ["true", "false"]
env:
AMICI_EXTRACT_CSE: ${{ matrix.extract_subexpressions }}
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
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=2 pip3 install -v --user \
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1)[petab,test,vis]
# retrieve test models
- name: Download and test benchmark collection
run: |
git clone --depth 1 https://github.com/benchmarking-initiative/Benchmark-Models-PEtab.git \
&& export BENCHMARK_COLLECTION="$(pwd)/Benchmark-Models-PEtab/Benchmark-Models/" \
&& AMICI_PARALLEL_COMPILE=2 tests/benchmark-models/test_benchmark_collection.sh
# run gradient checks
- name: Run Gradient Checks
run: |
pip install git+https://github.com/ICB-DCM/fiddy.git \
&& cd tests/benchmark-models && pytest ./test_petab_benchmark.py
# upload results
- uses: actions/upload-artifact@v3
with:
name: computation times
path: |
tests/benchmark-models/computation_times.csv
tests/benchmark-models/computation_times.png