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 = {