Skip to content

Commit

Permalink
Benchmark problems look good
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Oct 10, 2024
1 parent 20db8dc commit 0cede49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
1 change: 1 addition & 0 deletions python/sdist/amici/de_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1707,6 +1707,7 @@ def _compute_equation(self, name: str) -> None:
tmp_eq += smart_multiply(
self.eq("ddeltaxdx")[ie], tmp_dxdp
)

else:
tmp_eq = smart_multiply(
self.sym("xdot") - self.sym("xdot_old"),
Expand Down
18 changes: 5 additions & 13 deletions tests/benchmark-models/test_petab_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class GradientCheckSettings:
settings = defaultdict(GradientCheckSettings)
# NOTE: Newton method fails badly with ASA for Blasi_CellSystems2016
settings["Blasi_CellSystems2016"] = GradientCheckSettings(
atol_check=1e-12,
atol_check=1e-3,
rtol_check=1e-4,
ss_sensitivity_mode=amici.SteadyStateSensitivityMode.integrationOnly,
)
Expand All @@ -87,6 +87,8 @@ class GradientCheckSettings:
)
settings["Brannmark_JBC2010"] = GradientCheckSettings(
ss_sensitivity_mode=amici.SteadyStateSensitivityMode.integrationOnly,
atol_check=1e-6,
rtol_check=1e-3,
)
settings["Giordano_Nature2020"] = GradientCheckSettings(
atol_check=1e-6, rtol_check=1e-3, rng_seed=1
Expand All @@ -102,6 +104,8 @@ class GradientCheckSettings:
# Avoid "root after reinitialization"
atol_sim=1e-12,
rtol_sim=1e-12,
rtol_check=1e-3,
atol_check=1e-12,
)
settings["Smith_BMCSystBiol2013"] = GradientCheckSettings(
atol_sim=1e-10,
Expand Down Expand Up @@ -163,18 +167,6 @@ def test_benchmark_gradient(model, scale, sensitivity_method, request):
# only fail on linear scale
pytest.skip()

if (
model
in (
# events with parameter-dependent triggers
# https://github.com/AMICI-dev/AMICI/issues/18
"Oliveira_NatCommun2021",
)
and sensitivity_method == SensitivityMethod.adjoint
):
# FIXME
pytest.skip()

petab_problem = benchmark_models_petab.get_problem(model)
petab.flatten_timepoint_specific_output_overrides(petab_problem)

Expand Down

0 comments on commit 0cede49

Please sign in to comment.