From f53d4a02f7953bb749bb5b575823fbf37e86b0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Fr=C3=B6hlich?= Date: Thu, 5 Dec 2024 11:00:06 +0000 Subject: [PATCH] run preequilibration once --- python/sdist/amici/jax/petab.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/python/sdist/amici/jax/petab.py b/python/sdist/amici/jax/petab.py index 1bd42fe6c1..e97f7d2e7a 100644 --- a/python/sdist/amici/jax/petab.py +++ b/python/sdist/amici/jax/petab.py @@ -406,11 +406,9 @@ def run_simulations( simulation_conditions = problem.get_all_simulation_conditions() preeqs = { - sc[1]: problem.run_preequilibration( - sc[1], solver, controller, max_steps - ) - for sc in simulation_conditions - if len(sc) > 1 + sc: problem.run_preequilibration(sc, solver, controller, max_steps) + # only run preequilibration once per condition + for sc in {sc[1] for sc in simulation_conditions if len(sc) > 1} } results = {