Skip to content

Commit f8897de

Browse files
committed
resolve conflict
2 parents f4b5978 + 195a165 commit f8897de

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

bigcodebench/evaluate.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import threading
77
import time
88
from collections import Counter, defaultdict
9-
from concurrent.futures import ProcessPoolExecutor, as_completed
9+
from concurrent.futures import ProcessPoolExecutor, as_completed, wait, FIRST_COMPLETED
1010
from datetime import datetime
1111
from typing import Any, Dict, List, Tuple, Optional
1212
from warnings import warn
@@ -255,15 +255,15 @@ def evaluate(
255255
assert n_samples == len(remainings), "Missing problems in unfinished"
256256
assert len(completion_id) == len(problems), "Missing problems in samples"
257257

258-
def stucking_checker():
259-
while remainings:
260-
last_size = len(remainings)
261-
time.sleep(240)
262-
if last_size != len(remainings) or len(remainings) == 0:
263-
continue
264-
# Potential stucking
265-
warn("No samples had finished testing in the last 240s")
266-
warn(f"{len(remainings)} samples to be tested: {remainings}")
258+
def stucking_checker():
259+
while remainings:
260+
last_size = len(remainings)
261+
time.sleep(240)
262+
if last_size != len(remainings) or len(remainings) == 0:
263+
continue
264+
# Potential stucking
265+
warn("No samples had finished testing in the last 240s")
266+
warn(f"{len(remainings)} samples to be tested: {remainings}")
267267

268268
threading.Thread(target=stucking_checker).start()
269269

0 commit comments

Comments
 (0)