Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions evaluate_classical.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import argparse
import asyncio
from typing import List, Dict, Any, Tuple
import pickle as pkl
import tqdm
Expand Down Expand Up @@ -59,14 +60,14 @@ def judge(args: Tuple[Dict[str, Any], str, bool]) -> bool:
for testcase_path in testsuite_paths:

start = time.time()
flg, gold_result = exec_on_db(testcase_path, gold_query, timeout=GOLD_TIMEOUT)
flg, gold_result = asyncio.run(exec_on_db(testcase_path, gold_query, timeout=GOLD_TIMEOUT))
duration = time.time() - start
timeout = ADDITIVE_OVERHEAD + MULTIPLICATIVE_OVERHEAD * duration

if flg != 'result':
print('Warning: executing gold query results in an exception')
continue
flg, pred_result = exec_on_db(testcase_path, pred, timeout=int(timeout))
flg, pred_result = asyncio.run(exec_on_db(testcase_path, pred, timeout=int(timeout)))
if flg != 'result':
pass_all_testcase = False
break
Expand Down