diff --git a/tests/benchmark-models/test_petab_benchmark.py b/tests/benchmark-models/test_petab_benchmark.py index 3928d64cae..109839f0f3 100644 --- a/tests/benchmark-models/test_petab_benchmark.py +++ b/tests/benchmark-models/test_petab_benchmark.py @@ -92,7 +92,7 @@ class GradientCheckSettings: rtol_sim=1e-14, noise_level=0.01, ) -settings["Okuonghae_ChaosSolitonsFractals2020"].step_sizes.insert(0, 0.2) +settings["Okuonghae_ChaosSolitonsFractals2020"].step_sizes.extend([0.2, 0.005]) settings["Oliveira_NatCommun2021"] = GradientCheckSettings( # Avoid "root after reinitialization" atol_sim=1e-12, @@ -107,6 +107,7 @@ class GradientCheckSettings: rtol_sim=1e-12, atol_check=1e-5, rtol_check=1e-4, + rng_seed=7, ) settings["Weber_BMC2015"] = GradientCheckSettings( atol_sim=1e-12, @@ -291,16 +292,12 @@ def assert_gradient_check_success( with pd.option_context("display.max_columns", None, "display.width", None): message = ( f"Gradient check failed:\n{df}\n\n" - f"Maximum absolute difference: {max_adiff}\n" - f"Maximum relative difference: {max_rdiff}" + f"Maximum absolute difference: {max_adiff} (tolerance: {atol})\n" + f"Maximum relative difference: {max_rdiff} (tolerance: {rtol})" ) if check_result.success is False: - raise AssertionError( - f"Gradient check failed:\n{df}\n\n" - f"Maximum absolute difference: {max_adiff}\n" - f"Maximum relative difference: {max_rdiff}" - ) + raise AssertionError(message) if always_print: print(message)