alozowski HF Staff commited on
Commit
0569297
·
1 Parent(s): 0fce8e6

Change timeout

Browse files
Files changed (1) hide show
  1. yourbench_space/evaluation.py +5 -1
yourbench_space/evaluation.py CHANGED
@@ -22,7 +22,11 @@ async def run_process(args: list, custom_env = None) -> dict:
22
  process = await asyncio.create_subprocess_exec(
23
  *args, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, env=custom_env
24
  )
25
- await asyncio.wait_for(process.wait(), timeout=180)
 
 
 
 
26
  stdout = await process.stdout.read()
27
  stderr = await process.stderr.read()
28
  return {"pid": process.pid, "stdout": stdout.decode(), "stderr": stderr.decode()}
 
22
  process = await asyncio.create_subprocess_exec(
23
  *args, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE, env=custom_env
24
  )
25
+ try:
26
+ await asyncio.wait_for(process.wait(), timeout=300)
27
+ except TimeoutError:
28
+ logger.error("Lighteval process Timed Out")
29
+
30
  stdout = await process.stdout.read()
31
  stderr = await process.stderr.read()
32
  return {"pid": process.pid, "stdout": stdout.decode(), "stderr": stderr.decode()}