-
Notifications
You must be signed in to change notification settings - Fork 30
Support for PEtab SciML in jax #2614
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
Merged
Merged
Changes from all commits
Commits
Show all changes
118 commits
Select commit
Hold shift + click to select a range
512c56c
add jax serialisation
FFroehlich 9fd5835
doc
FFroehlich 862586d
no compilation for jax
FFroehlich 674c481
bad ruff
FFroehlich 3e7d453
Update ExampleJaxPEtab.ipynb
FFroehlich b2a95b1
bad ruff
FFroehlich 8b713e6
Update ExampleJaxPEtab.ipynb
FFroehlich f79a96e
add nan safe log÷
FFroehlich aec0712
merge
FFroehlich 2672be2
some net cases and first ude testcase passing
FFroehlich 76d599c
some more passing ude test
FFroehlich 0605b78
updates
FFroehlich d166f03
Merge branch 'develop' into jax_sciml
FFroehlich ca209ac
fix merge
FFroehlich b201f4e
remove changes doc
FFroehlich ea1c75e
update net_004_alt test
FFroehlich b9add9d
refactor to pytests
FFroehlich 484e853
Merge branch 'develop' into jax_sciml
FFroehlich eea558b
Merge branch 'develop' into jax_sciml
FFroehlich b8632f1
fixup merge
FFroehlich 031b524
fix net test-cases
FFroehlich cfb0b5a
fixes & remove sciml dependency
FFroehlich 2b698fb
Merge branch 'develop' into jax_sciml
FFroehlich d14d2af
Merge branch 'develop' into jax_sciml
FFroehlich 8b8f9a8
fixup, add initial condition support
FFroehlich 982d275
Update petab.py
FFroehlich 33f86bb
Update test_petab_sciml.yml
FFroehlich 5a84682
Update petab.py
FFroehlich 97c7bbb
Update petab.py
FFroehlich ac79583
Update petab.py
FFroehlich 4de63c4
Update ExampleJaxPEtab.ipynb
FFroehlich 2fb392c
ignore test warning
FFroehlich 4f3aff3
Update test_petab_sciml.yml
FFroehlich 9c3fd4d
add hybridisation support
FFroehlich 1349ddb
fix workflow
FFroehlich 731b925
Merge branch 'develop' into jax_sciml
FFroehlich 2ec62a5
Merge branch 'develop' into jax_sciml
FFroehlich 4596dc4
update testsuite
FFroehlich bd103db
update after test refactor
FFroehlich 6f9309c
Merge branch 'develop' into jax_sciml
FFroehlich 2b6308d
fix hybridization
FFroehlich 6089a95
Merge remote-tracking branch 'origin/jax_sciml' into jax_sciml
FFroehlich 924aa3e
Merge branch 'develop' into jax_sciml
FFroehlich eaf3e09
update testsuite
FFroehlich 4c6947e
update testsuite, some fixes
FFroehlich 59c9be6
Update testsuite
FFroehlich 6632a9c
fix #2687
FFroehlich f63f61b
Merge remote-tracking branch 'origin/fix_2687' into jax_sciml
FFroehlich 6b133e2
spec updates
FFroehlich 605adcb
Merge branch 'develop' into jax_sciml
FFroehlich 7f5c3ad
updates for overhauled testsuite
FFroehlich cff3515
Merge branch 'develop' into jax_sciml
FFroehlich 0348ee4
Update nn.py
FFroehlich 381bf6d
Merge branch 'main' into jax_sciml
FFroehlich 20d09f9
Merge branch 'main' into jax_sciml
FFroehlich b73cf60
Merge branch 'main' into jax_sciml
FFroehlich ceacc53
Merge branch 'main' into jax_sciml
FFroehlich f1ece15
Update petab_import.py
FFroehlich ec1ed55
Getting test_net petab-sciml tests to pass
BSnelling 2e14198
Implementing features for a subset of ude petab_sciml test cases. Exc…
BSnelling d2137c3
update petab_sciml workflow - on branches and sciml install branch
BSnelling 75a3630
updates to petab sciml workflow
BSnelling 8a76e44
fix undef local var in jax tests
BSnelling 374922c
frozen layers for RHS networks
BSnelling c2a386b
implement nns in the observable formula
BSnelling 8bce416
tidy, refactor, generalise sciml test case implementations
BSnelling b322555
hybridization df in _petab_problem - makes JAXProblem jit-able
BSnelling dddc4c2
update frozen layer/arrays implementation
BSnelling 5f5fb8c
update jax petab notebook
BSnelling ddc68fa
add h5py to docs deps
BSnelling 9e744c7
fix sbml jax tests
BSnelling 021ea45
missed rebased imports
BSnelling e630100
codecov maybe
BSnelling 08e58a0
codecov - update cov file name
BSnelling 55363e1
codecov - specify cov path
BSnelling 6782793
enable zero params case
BSnelling 3ad2309
doc build forward type definition workaround
BSnelling 23227aa
simplify array input processing
BSnelling 2641a80
Merge pull request #2947 from AMICI-dev/bes/jax_sciml
BSnelling 0c59162
Merge branch 'main' into jax_sciml
FFroehlich 5aacad8
bump versions, fixup notebook
FFroehlich a4089c3
Merge branch 'main' into jax_sciml
FFroehlich 9009075
safety around nn_output_ids
BSnelling 257e859
reinstate test
BSnelling b10b6f1
fix imports from amici.jax.nn
BSnelling da4fd83
Merge branch 'main' into jax_sciml
FFroehlich 0b3bb26
skip petab tests with mapping df
FFroehlich 94c407f
Merge branch 'main' into jax_sciml
FFroehlich fa95339
Merge branch 'main' into jax_sciml
FFroehlich f3f09ea
Apply suggestion from @dweindl
FFroehlich d30b710
Update python/sdist/amici/petab/petab_import.py
FFroehlich bfe1ad6
Update python/sdist/amici/petab/petab_import.py
FFroehlich f8b7b21
Merge branch 'main' into jax_sciml
FFroehlich 548f754
review comments
FFroehlich b02507c
document hybridization table
FFroehlich 090dfa1
update sciml repo
FFroehlich 2b76193
refactor and add documentation to nn code
FFroehlich 56cb561
print missing components
FFroehlich 8e5952e
add tests
FFroehlich c5e8b0b
refactor _initialize_model_with_nominal_values
FFroehlich 3a3ec71
fix doc, canonical spelling
FFroehlich 775db53
Update python/sdist/amici/jax/model.py
FFroehlich f71f25f
Update python/sdist/amici/jax/nn.py
FFroehlich 736de03
Update python/sdist/amici/jax/nn.py
FFroehlich 01d1f66
Update python/sdist/amici/jax/petab.py
FFroehlich 59e8dce
Update python/sdist/amici/petab/petab_import.py
FFroehlich f1bb8c5
Apply suggestion from @dweindl
FFroehlich b61273d
Apply suggestion from @dweindl
FFroehlich e9d1baf
Apply suggestion from @dweindl
FFroehlich 8411dc6
pre-commit fixes
FFroehlich a7bd6ea
fixup
FFroehlich 69069ea
update changelog
FFroehlich 3672214
update testsuite, add support for cat
FFroehlich e90aade
Merge branch 'main' into jax_sciml
FFroehlich ed2bcd3
remove gitmodule
FFroehlich a1f1cab
refactor testsuite
FFroehlich f0b3c7e
remove initialization tests
FFroehlich 675cee9
Update test_sciml.py
FFroehlich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| name: PEtab | ||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - develop | ||
| - jax_sciml | ||
| merge_group: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| name: PEtab SciML Testsuite | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| ENABLE_GCOV_COVERAGE: TRUE | ||
|
|
||
| strategy: | ||
| matrix: | ||
| python-version: ["3.12"] | ||
|
|
||
| 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 | ||
|
|
||
| # todo, update after https://github.com/sebapersson/petab_sciml_testsuite/issues/14 is merged | ||
| - name: Download PEtab SciML test suite | ||
| run: | | ||
| git clone --depth 1 --branch main \ | ||
| https://github.com/FFroehlich/petab_sciml_testsuite \ | ||
| tests/sciml/testsuite | ||
|
|
||
| - 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 | ||
| run: | | ||
| source ./venv/bin/activate \ | ||
| && python -m pip install git+https://github.com/petab-dev/petab_sciml.git@main#subdirectory=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@sciml \ | ||
|
|
||
| - name: Run PEtab SciML testsuite | ||
| run: | | ||
| source ./venv/bin/activate \ | ||
| && pytest --cov-report=xml:coverage_petab_sciml.xml \ | ||
| --cov=amici 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_petab_sciml.xml | ||
| flags: petab_sciml | ||
| fail_ci_if_error: true |
This file contains hidden or 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
Empty file.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.