Commit 4360d5e
Support for PEtab SciML in jax (#2614)
* add jax serialisation
* doc
* no compilation for jax
* bad ruff
* Update ExampleJaxPEtab.ipynb
* bad ruff
* Update ExampleJaxPEtab.ipynb
* add nan safe log÷
* some net cases and first ude testcase passing
* some more passing ude test
* updates
* fix merge
* remove changes doc
* update net_004_alt test
* refactor to pytests
* fixup merge
* fix net test-cases
* fixes & remove sciml dependency
* fixup, add initial condition support
* Update petab.py
* Update test_petab_sciml.yml
* Update petab.py
* Update petab.py
* Update petab.py
* Update ExampleJaxPEtab.ipynb
* ignore test warning
* Update test_petab_sciml.yml
* add hybridisation support
* fix workflow
* update testsuite
* update after test refactor
* fix hybridization
* update testsuite
* update testsuite, some fixes
* Update testsuite
* fix #2687
* spec updates
* updates for overhauled testsuite
* Update nn.py
* Update petab_import.py
* Getting test_net petab-sciml tests to pass
- update sciml testsuite submodule to point at main
- fix a eqx LayerNorm deprecation warning
- fix string formatting of bool in kwarg
- updates to test code driven by updated sciml format
* Implementing features for a subset of ude petab_sciml test cases. Excludes:
- frozen nn layers
- nns in observable formulae
* update petab_sciml workflow - on branches and sciml install branch
* updates to petab sciml workflow
* fix undef local var in jax tests
* frozen layers for RHS networks
generalise frozen layers to networks across system
Use stop_grad instead
* implement nns in the observable formula
* tidy, refactor, generalise sciml test case implementations
* hybridization df in _petab_problem - makes JAXProblem jit-able
* update frozen layer/arrays implementation
* update jax petab notebook
* add h5py to docs deps
* fix sbml jax tests
* missed rebased imports
* codecov maybe
* codecov - update cov file name
* codecov - specify cov path
* enable zero params case
* doc build forward type definition workaround
* simplify array input processing
* bump versions, fixup notebook
* safety around nn_output_ids
* reinstate test
* fix imports from amici.jax.nn
* skip petab tests with mapping df
* Apply suggestion from @dweindl
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* Update python/sdist/amici/petab/petab_import.py
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* Update python/sdist/amici/petab/petab_import.py
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* review comments
* document hybridization table
* update sciml repo
* refactor and add documentation to nn code
* print missing components
* add tests
* refactor _initialize_model_with_nominal_values
* fix doc, canonical spelling
* Update python/sdist/amici/jax/model.py
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* Update python/sdist/amici/jax/nn.py
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* Update python/sdist/amici/jax/nn.py
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* Update python/sdist/amici/jax/petab.py
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* Update python/sdist/amici/petab/petab_import.py
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* Apply suggestion from @dweindl
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* Apply suggestion from @dweindl
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* Apply suggestion from @dweindl
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>
* pre-commit fixes
* fixup
* update changelog
* update testsuite, add support for cat
* remove gitmodule
* refactor testsuite
* remove initialization tests
* Update test_sciml.py
---------
Co-authored-by: Branwen Snelling <branwen.snelling@crick.ac.uk>
Co-authored-by: Daniel Weindl <dweindl@users.noreply.github.com>1 parent 45f6650 commit 4360d5e
File tree
26 files changed
+2346
-59
lines changed- .github/workflows
- doc
- examples/example_jax_petab
- python
- sdist
- amici
- jax
- petab
- tests
- tests
- petab_test_suite
- sciml
26 files changed
+2346
-59
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
196 | 199 | | |
197 | 200 | | |
198 | 201 | | |
| 202 | + | |
Whitespace-only changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
77 | 79 | | |
78 | 80 | | |
79 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
365 | 366 | | |
366 | 367 | | |
367 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
368 | 374 | | |
369 | 375 | | |
370 | 376 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | 105 | | |
| |||
356 | 361 | | |
357 | 362 | | |
358 | 363 | | |
359 | | - | |
| 364 | + | |
360 | 365 | | |
361 | 366 | | |
362 | 367 | | |
| |||
393 | 398 | | |
394 | 399 | | |
395 | 400 | | |
396 | | - | |
| 401 | + | |
397 | 402 | | |
398 | 403 | | |
399 | 404 | | |
| |||
612 | 617 | | |
613 | 618 | | |
614 | 619 | | |
615 | | - | |
616 | | - | |
617 | | - | |
618 | 620 | | |
619 | | - | |
| 621 | + | |
620 | 622 | | |
621 | 623 | | |
622 | 624 | | |
623 | 625 | | |
624 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
625 | 630 | | |
626 | 631 | | |
627 | 632 | | |
| |||
687 | 692 | | |
688 | 693 | | |
689 | 694 | | |
690 | | - | |
691 | | - | |
| 695 | + | |
692 | 696 | | |
693 | 697 | | |
694 | 698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
170 | 171 | | |
| |||
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
199 | 204 | | |
200 | 205 | | |
201 | 206 | | |
| |||
237 | 242 | | |
238 | 243 | | |
239 | 244 | | |
| 245 | + | |
240 | 246 | | |
241 | 247 | | |
242 | 248 | | |
| |||
0 commit comments