Jax export #7667
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.11" ] | |
extract_subexpressions: ["true", "false"] | |
env: | |
AMICI_EXTRACT_CSE: ${{ matrix.extract_subexpressions }} | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/checkout@v4 | |
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] | |
- run: | | |
python3 -m pip uninstall -y petab && python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@develop \ | |
&& python3 -m pip install -U sympy | |
# 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/" \ | |
&& pip3 install -e $BENCHMARK_COLLECTION/../src/python \ | |
&& AMICI_PARALLEL_COMPILE="" 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 --durations=10 ./test_petab_benchmark.py | |
# upload results | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: computation-times-${{ matrix.python-version }}-${{ matrix.extract_subexpressions }} | |
path: | | |
tests/benchmark-models/computation_times.csv | |
tests/benchmark-models/computation_times.png |