Skip to content

Commit afc1f87

Browse files
committed
Reset timer on progress
1 parent 6c01136 commit afc1f87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bigcodebench/evaluate.py

Lines changed: 3 additions & 3 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, wait, ALL_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
1212
from warnings import warn
@@ -204,9 +204,9 @@ def evaluate(flags):
204204
assert len(completion_id) == len(problems), "Missing problems in samples"
205205

206206
def stucking_checker():
207-
not_done = [True]
207+
not_done = futures
208208
while len(not_done) > 0:
209-
done, not_done = wait(futures, timeout=240, return_when=ALL_COMPLETED)
209+
done, not_done = wait(not_done, timeout=240, return_when=FIRST_COMPLETED)
210210

211211
if len(done) == 0:
212212
warn("No samples have finished testing in the last 240s")

0 commit comments

Comments
 (0)