From 5d3386c16d0665dadd81e496306073399b16857b Mon Sep 17 00:00:00 2001 From: user <59329744+dilpath@users.noreply.github.com> Date: Wed, 22 Jul 2026 14:44:42 +0200 Subject: [PATCH 1/2] add silu support, fix neural_nets typo --- doc/examples/getting_started/problem.yaml | 2 +- doc/examples/how_to_dmms/problem.yaml | 2 +- doc/examples/how_to_neural_ode/problem.yaml | 2 +- doc/examples/how_to_observable/problem.yaml | 2 +- doc/layers.rst | 3 +++ petab_sciml/problem_utils/neural_ode.py | 2 +- tests/problem_utils/test_neural_ode.py | 6 ++++-- 7 files changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/examples/getting_started/problem.yaml b/doc/examples/getting_started/problem.yaml index c24db02b..31ca7a55 100644 --- a/doc/examples/getting_started/problem.yaml +++ b/doc/examples/getting_started/problem.yaml @@ -18,7 +18,7 @@ extensions: - "net1_ps.hdf5" hybridization_files: - "hybridization.tsv" - neural_nets: + neural_networks: net1: location: "net1.yaml" static: false diff --git a/doc/examples/how_to_dmms/problem.yaml b/doc/examples/how_to_dmms/problem.yaml index 1ddb6987..1c56d889 100644 --- a/doc/examples/how_to_dmms/problem.yaml +++ b/doc/examples/how_to_dmms/problem.yaml @@ -19,7 +19,7 @@ extensions: - "net3_input2.hdf5" hybridization_files: - "hybridization.tsv" - neural_nets: + neural_networks: net3: location: "net3.yaml" static: true diff --git a/doc/examples/how_to_neural_ode/problem.yaml b/doc/examples/how_to_neural_ode/problem.yaml index 1804dfa6..8911f5f6 100644 --- a/doc/examples/how_to_neural_ode/problem.yaml +++ b/doc/examples/how_to_neural_ode/problem.yaml @@ -18,7 +18,7 @@ extensions: - net1_ps.hdf5 hybridization_files: - hybridization.tsv - neural_nets: + neural_networks: net1: location: net1.yaml static: false diff --git a/doc/examples/how_to_observable/problem.yaml b/doc/examples/how_to_observable/problem.yaml index c24db02b..31ca7a55 100644 --- a/doc/examples/how_to_observable/problem.yaml +++ b/doc/examples/how_to_observable/problem.yaml @@ -18,7 +18,7 @@ extensions: - "net1_ps.hdf5" hybridization_files: - "hybridization.tsv" - neural_nets: + neural_networks: net1: location: "net1.yaml" static: false diff --git a/doc/layers.rst b/doc/layers.rst index d7708fb4..f52c2bef 100644 --- a/doc/layers.rst +++ b/doc/layers.rst @@ -176,6 +176,9 @@ Additionally, the table indicates which tools support each layer. | moid `__ | | | +--------------------------------------------------------------+----+---+ +| `silu `__ | | | ++--------------------------------------------------------------+----+---+ | `mish `__ | | | +--------------------------------------------------------------+----+---+ diff --git a/petab_sciml/problem_utils/neural_ode.py b/petab_sciml/problem_utils/neural_ode.py index 927ae133..ded40478 100644 --- a/petab_sciml/problem_utils/neural_ode.py +++ b/petab_sciml/problem_utils/neural_ode.py @@ -208,7 +208,7 @@ def create_neural_ode_problem( "sciml": { "version": "0.1.0", "required": True, - "neural_nets": { + "neural_networks": { network_name: { "location": network_filename, "pre_initialization": False, diff --git a/tests/problem_utils/test_neural_ode.py b/tests/problem_utils/test_neural_ode.py index c3f41832..07c07854 100644 --- a/tests/problem_utils/test_neural_ode.py +++ b/tests/problem_utils/test_neural_ode.py @@ -152,9 +152,11 @@ def test_create_neural_ode_problem(dir_tmp): assert problem["model_files"]["model"]["location"] == "model.xml" assert problem["measurement_files"][0] == "measurements.tsv" - assert "net1" in problem["extensions"]["sciml"]["neural_nets"] + assert "net1" in problem["extensions"]["sciml"]["neural_networks"] assert ( - problem["extensions"]["sciml"]["neural_nets"]["net1"]["location"] + problem["extensions"]["sciml"]["neural_networks"]["net1"][ + "location" + ] == "net1.yaml" ) assert "array_files" in problem["extensions"]["sciml"] From 70551c6706239542ac81eeb69166538a7dda5b45 Mon Sep 17 00:00:00 2001 From: user <59329744+dilpath@users.noreply.github.com> Date: Thu, 23 Jul 2026 19:07:57 +0200 Subject: [PATCH 2/2] review: swish --- doc/layers.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/layers.rst b/doc/layers.rst index f52c2bef..7d7c3529 100644 --- a/doc/layers.rst +++ b/doc/layers.rst @@ -176,8 +176,8 @@ Additionally, the table indicates which tools support each layer. | moid `__ | | | +--------------------------------------------------------------+----+---+ -| `silu `__ | | | +| `silu (swish) `__ | | | +--------------------------------------------------------------+----+---+ | `mish `__ | | |