Skip to content

Commit

Permalink
Refactor benchmark collection tests
Browse files Browse the repository at this point in the history
* Refactor tests/benchmark-models/test_benchmark_collection.sh into pytest cases
* Unify with gradient checks in `tests/benchmark-models/test_petab_benchmark.py`

Closes #2510.
  • Loading branch information
dweindl committed Oct 24, 2024
1 parent 56e6956 commit 396f642
Show file tree
Hide file tree
Showing 4 changed files with 266 additions and 438 deletions.
21 changes: 10 additions & 11 deletions .github/workflows/test_benchmark_collection_models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,22 @@ jobs:
AMICI_PARALLEL_COMPILE="" pip3 install -v --user \
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1)[petab,test,vis]
- run: |
- name: Install test dependencies
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
&& python3 -m pip install -U sympy \
&& python3 -m pip install git+https://github.com/ICB-DCM/fiddy.git
# retrieve test models
- name: Download and test benchmark collection
- name: Download 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
&& python3 -m pip install -e Benchmark-Models-PEtab/src/python
# run gradient checks
- name: Run Gradient Checks
- name: Run tests
env:
AMICI_PARALLEL_COMPILE: ""
run: |
pip install git+https://github.com/ICB-DCM/fiddy.git \
&& cd tests/benchmark-models && pytest --durations=10 ./test_petab_benchmark.py
cd tests/benchmark-models && pytest --durations=10
# upload results
- uses: actions/upload-artifact@v4
Expand Down
149 changes: 0 additions & 149 deletions tests/benchmark-models/test_benchmark_collection.sh

This file was deleted.

Loading

0 comments on commit 396f642

Please sign in to comment.