From 024c47de19f92ddef28ae147505f72d442079114 Mon Sep 17 00:00:00 2001 From: Lukas Rothenberger Date: Tue, 20 Aug 2024 09:51:48 +0200 Subject: [PATCH] feat(autotuner): adaptive timeout --- discopop_library/EmpiricalAutotuning/Autotuner.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/discopop_library/EmpiricalAutotuning/Autotuner.py b/discopop_library/EmpiricalAutotuning/Autotuner.py index 43b751c9f..9ec0f90ca 100644 --- a/discopop_library/EmpiricalAutotuning/Autotuner.py +++ b/discopop_library/EmpiricalAutotuning/Autotuner.py @@ -192,6 +192,13 @@ def run(arguments: AutotunerArguments) -> None: + " stored at " + best_suggestion_configuration[1].root_path ) + # update the timeout according to the new time measurement + timeout_after = max( + 3.0, cast(ExecutionResult, best_suggestion_configuration[1].execution_result).runtime * 2 + ) + logger.debug("Updated timeout to: " + str(round(timeout_after, 3))) + + # update the graph and store the current best configuration statistics_graph.add_child( "step " + str(statistics_step_num)