Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for PEtab SciML in jax #2614

Draft
wants to merge 42 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
512c56c
add jax serialisation
FFroehlich Nov 28, 2024
9fd5835
doc
FFroehlich Nov 28, 2024
862586d
no compilation for jax
FFroehlich Nov 28, 2024
674c481
bad ruff
FFroehlich Nov 28, 2024
3e7d453
Update ExampleJaxPEtab.ipynb
FFroehlich Nov 28, 2024
b2a95b1
bad ruff
FFroehlich Nov 28, 2024
8b713e6
Update ExampleJaxPEtab.ipynb
FFroehlich Nov 28, 2024
f79a96e
add nan safe log&divide
FFroehlich Nov 30, 2024
aec0712
merge
FFroehlich Dec 1, 2024
2672be2
some net cases and first ude testcase passing
FFroehlich Dec 2, 2024
76d599c
some more passing ude test
FFroehlich Dec 2, 2024
0605b78
updates
FFroehlich Dec 2, 2024
d166f03
Merge branch 'develop' into jax_sciml
FFroehlich Dec 2, 2024
ca209ac
fix merge
FFroehlich Dec 2, 2024
b201f4e
remove changes doc
FFroehlich Dec 2, 2024
ea1c75e
update net_004_alt test
FFroehlich Dec 2, 2024
b9add9d
refactor to pytests
FFroehlich Dec 3, 2024
484e853
Merge branch 'develop' into jax_sciml
FFroehlich Dec 3, 2024
eea558b
Merge branch 'develop' into jax_sciml
FFroehlich Dec 3, 2024
b8632f1
fixup merge
FFroehlich Dec 3, 2024
031b524
fix net test-cases
FFroehlich Dec 3, 2024
cfb0b5a
fixes & remove sciml dependency
FFroehlich Dec 3, 2024
2b698fb
Merge branch 'develop' into jax_sciml
FFroehlich Dec 6, 2024
d14d2af
Merge branch 'develop' into jax_sciml
FFroehlich Dec 8, 2024
8b8f9a8
fixup, add initial condition support
FFroehlich Dec 8, 2024
982d275
Update petab.py
FFroehlich Dec 8, 2024
33f86bb
Update test_petab_sciml.yml
FFroehlich Dec 8, 2024
5a84682
Update petab.py
FFroehlich Dec 8, 2024
97c7bbb
Update petab.py
FFroehlich Dec 8, 2024
ac79583
Update petab.py
FFroehlich Dec 8, 2024
4de63c4
Update ExampleJaxPEtab.ipynb
FFroehlich Dec 8, 2024
2fb392c
ignore test warning
FFroehlich Dec 8, 2024
4f3aff3
Update test_petab_sciml.yml
FFroehlich Dec 8, 2024
9c3fd4d
add hybridisation support
FFroehlich Dec 8, 2024
1349ddb
fix workflow
FFroehlich Dec 8, 2024
731b925
Merge branch 'develop' into jax_sciml
FFroehlich Dec 13, 2024
2ec62a5
Merge branch 'develop' into jax_sciml
FFroehlich Dec 19, 2024
4596dc4
update testsuite
FFroehlich Dec 19, 2024
bd103db
update after test refactor
FFroehlich Dec 19, 2024
6f9309c
Merge branch 'develop' into jax_sciml
FFroehlich Jan 27, 2025
2b6308d
fix hybridization
FFroehlich Jan 27, 2025
6089a95
Merge remote-tracking branch 'origin/jax_sciml' into jax_sciml
FFroehlich Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/test_petab_sciml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: PEtab
on:
push:
branches:
- develop
- master
pull_request:
branches:
- master
- develop
merge_group:
workflow_dispatch:

jobs:
build:
name: PEtab SciML Testsuite

runs-on: ubuntu-latest

env:
ENABLE_GCOV_COVERAGE: TRUE

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

# install dependencies
- name: apt
run: |
sudo apt-get update \
&& sudo apt-get install -y python3-venv

- run: |
echo "${HOME}/.local/bin/" >> $GITHUB_PATH

# install AMICI
- name: Install python package
run: scripts/installAmiciSource.sh

- name: Install petab
run: |
source ./venv/bin/activate \
&& pip3 install wheel pytest shyaml pytest-cov

# retrieve test models
- name: Download and install PEtab SciML test suite
run: |
git clone --depth 1 --branch main \
https://github.com/sebapersson/petab_sciml.git \
&& export SCIML_TESTSUITE="$(pwd)/petab_sciml" \
&& source venv/bin/activate \
&& python -m pip install -e $SCIML_TESTSUITE/src/python


- name: Install petab
run: |
source ./venv/bin/activate \
&& python3 -m pip uninstall -y petab \
&& python3 -m pip install git+https://github.com/petab-dev/libpetab-python.git@develop \

- name: Run PEtab SciML testsuite
run: |
source ./venv/bin/activate \
&& pytest --cov-report=xml:coverage.xml \
--cov=./ tests/sciml/test_sciml.py

- name: Codecov
if: github.event_name == 'pull_request' || github.repository_owner == 'AMICI-dev'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.xml
flags: petab
fail_ci_if_error: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -207,3 +207,4 @@ debug/*
tests/benchmark-models/cache_fiddy/*
venv/*
.coverage
tests/sciml/models/*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tests/sciml/testsuite"]
path = tests/sciml/testsuite
url = https://github.com/sebapersson/petab_sciml
1 change: 0 additions & 1 deletion documentation/ExampleJaxPEtab.ipynb

This file was deleted.

Loading
Loading