jjkim commited on
Commit
e8ced77
1 Parent(s): 2388a05

fix while break logic

Browse files
Files changed (1) hide show
  1. code_eval.py +4 -1
code_eval.py CHANGED
@@ -192,12 +192,15 @@ class CodeEval(evaluate.Metric):
192
 
193
  pbar = tqdm(total=len(results))
194
  prev_done_count = 0
195
- while not all(r.done() for r in results.values()):
 
 
196
  cur_done_count = 0
197
  for result in results.values():
198
  for r in result:
199
  if not r.done():
200
  r.refresh(early_stop)
 
201
  else:
202
  cur_done_count += 1
203
  pbar.update(cur_done_count - prev_done_count)
 
192
 
193
  pbar = tqdm(total=len(results))
194
  prev_done_count = 0
195
+ done = False
196
+ while not done:
197
+ done = True
198
  cur_done_count = 0
199
  for result in results.values():
200
  for r in result:
201
  if not r.done():
202
  r.refresh(early_stop)
203
+ done = False
204
  else:
205
  cur_done_count += 1
206
  pbar.update(cur_done_count - prev_done_count)