Performance Test #2293
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: Performance Test | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
- fix_perftest | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
schedule: | |
- cron: '48 4 * * *' | |
jobs: | |
build: | |
name: Performance Test | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: ["3.11"] | |
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: pip3 install petab shyaml build | |
- run: echo "${HOME}/.local/bin/" >> $GITHUB_PATH | |
- run: echo "${GITHUB_WORKSPACE}/tests/performance/" >> $GITHUB_PATH | |
# install AMICI | |
- name: Create AMICI sdist | |
run: | | |
cd python/sdist \ | |
&& check_time.sh create_sdist python3 -m build --sdist | |
- name: Install AMICI sdist | |
run: | | |
AMICI_PARALLEL_COMPILE="" check_time.sh \ | |
install_sdist pip3 install -v --user \ | |
$(ls -t python/sdist/dist/amici-*.tar.gz | head -1) | |
# retrieve test model | |
- run: git clone --depth 1 https://github.com/ICB-DCM/CS_Signalling_ERBB_RAS_AKT | |
# import test model | |
- name: Import test model | |
run: | | |
AMICI_IMPORT_NPROCS=2 check_time.sh petab_import python tests/performance/test.py import | |
- name: "Upload artifact: CS_Signalling_ERBB_RAS_AKT_petab" | |
uses: actions/upload-artifact@v4 | |
with: | |
name: model_performance_test | |
path: model_performance_test | |
# install model package | |
- name: Install test model | |
run: > | |
check_time.sh install_model tests/performance/test.py compile; | |
for opt in O0 O1 O2; | |
do | |
check_time.sh install_model_${opt} tests/performance/test.py compile_${opt}; | |
done | |
# run simulations | |
- name: forward_simulation | |
run: > | |
check_time.sh forward_simulation tests/performance/test.py forward_simulation; | |
for opt in O0 O1 O2; | |
do | |
check_time.sh forward_simulation tests/performance/test.py forward_simulation_${opt}; | |
done | |
- name: forward_sensitivities | |
run: > | |
check_time.sh forward_sensitivities tests/performance/test.py forward_sensitivities; | |
for opt in O0 O1 O2; | |
do | |
check_time.sh forward_sensitivities tests/performance/test.py forward_sensitivities_${opt}; | |
done | |
- name: adjoint_sensitivities | |
run: > | |
check_time.sh adjoint_sensitivities tests/performance/test.py adjoint_sensitivities; | |
for opt in O0 O1 O2; | |
do | |
check_time.sh adjoint_sensitivities tests/performance/test.py adjoint_sensitivities_${opt}; | |
done | |
- name: forward_simulation_non_optimal_parameters | |
run: | | |
check_time.sh forward_simulation_non_optimal_parameters tests/performance/test.py forward_simulation_non_optimal_parameters; | |
for opt in O0 O1 O2; | |
do | |
check_time.sh forward_simulation_non_optimal_parameters tests/performance/test.py forward_simulation_non_optimal_parameters_${opt}; | |
done | |
- name: adjoint_sensitivities_non_optimal_parameters | |
run: | | |
check_time.sh adjoint_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_sensitivities_non_optimal_parameters; | |
for opt in O0 O1 O2; | |
do | |
check_time.sh adjoint_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_sensitivities_non_optimal_parameters_${opt}; | |
done | |
- name: forward_steadystate_sensitivities_non_optimal_parameters | |
run: | | |
check_time.sh forward_steadystate_sensitivities_non_optimal_parameters tests/performance/test.py forward_steadystate_sensitivities_non_optimal_parameters; | |
for opt in O0 O1 O2; | |
do | |
check_time.sh forward_steadystate_sensitivities_non_optimal_parameters tests/performance/test.py forward_steadystate_sensitivities_non_optimal_parameters_${opt}; | |
done | |
- name: adjoint_steadystate_sensitivities_non_optimal_parameters | |
run: | | |
check_time.sh adjoint_steadystate_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_steadystate_sensitivities_non_optimal_parameters; | |
for opt in O0 O1 O2; | |
do | |
check_time.sh adjoint_steadystate_sensitivities_non_optimal_parameters tests/performance/test.py adjoint_steadystate_sensitivities_non_optimal_parameters_${opt}; | |
done |