@@ -42,14 +42,19 @@ async def run_with_timeout(
4242 coro: Coroutine function to run
4343 timeout: Timeout in seconds
4444 *args: Arguments to pass to the coroutine
45- timeout_error_value: Value to return on timeout (default: {"error": 0.0, "timeout": True})
45+ timeout_error_value: Value to return on timeout
46+ (default: {"combined_score": 0.0, "error": "Evaluation timed out", "timeout": True})
4647 **kwargs: Keyword arguments to pass to the coroutine
4748
4849 Returns:
4950 Result of the coroutine or timeout_error_value on timeout
5051 """
5152 if timeout_error_value is None :
52- timeout_error_value = {"error" : 0.0 , "timeout" : True }
53+ timeout_error_value = {
54+ "combined_score" : 0.0 ,
55+ "error" : "Evaluation timed out" ,
56+ "timeout" : True ,
57+ }
5358
5459 try :
5560 return await asyncio .wait_for (coro (* args , ** kwargs ), timeout = timeout )
@@ -68,14 +73,19 @@ async def run_sync_with_timeout(
6873 func: Synchronous function to run
6974 timeout: Timeout in seconds
7075 *args: Arguments to pass to the function
71- timeout_error_value: Value to return on timeout (default: {"error": 0.0, "timeout": True})
76+ timeout_error_value: Value to return on timeout
77+ (default: {"combined_score": 0.0, "error": "Evaluation timed out", "timeout": True})
7278 **kwargs: Keyword arguments to pass to the function
7379
7480 Returns:
7581 Result of the function or timeout_error_value on timeout
7682 """
7783 if timeout_error_value is None :
78- timeout_error_value = {"error" : 0.0 , "timeout" : True }
84+ timeout_error_value = {
85+ "combined_score" : 0.0 ,
86+ "error" : "Evaluation timed out" ,
87+ "timeout" : True ,
88+ }
7989
8090 try :
8191 loop = asyncio .get_event_loop ()
0 commit comments