@@ -1276,7 +1276,8 @@ async def run_evaluator(
12761276) -> EvalResultWithSummary [Input , Output ]:
12771277 """Wrapper on _run_evaluator_internal that times out execution after evaluator.timeout."""
12781278 results = await asyncio .wait_for (
1279- _run_evaluator_internal (experiment , evaluator , position , filters , stream , state , enable_cache ), evaluator .timeout
1279+ _run_evaluator_internal (experiment , evaluator , position , filters , stream , state , enable_cache ),
1280+ evaluator .timeout ,
12801281 )
12811282
12821283 if experiment :
@@ -1473,9 +1474,7 @@ def report_progress(event: TaskProgressEvent):
14731474 async def ensure_spans_flushed ():
14741475 # Flush native Braintrust spans
14751476 if experiment :
1476- await asyncio .get_event_loop ().run_in_executor (
1477- None , lambda : experiment .state .flush ()
1478- )
1477+ await asyncio .get_event_loop ().run_in_executor (None , lambda : experiment .state .flush ())
14791478 elif state :
14801479 await asyncio .get_event_loop ().run_in_executor (None , lambda : state .flush ())
14811480 else :
@@ -1672,7 +1671,9 @@ async def with_max_concurrency(coro):
16721671 tasks .append (asyncio .create_task (with_max_concurrency (run_evaluator_task (datum , trial_index ))))
16731672
16741673 if not tasks :
1675- eprint (f"{ bcolors .WARNING } Warning: no data rows found for evaluator '{ evaluator .eval_name } '. The experiment will be empty.{ bcolors .ENDC } " )
1674+ eprint (
1675+ f"{ bcolors .WARNING } Warning: no data rows found for evaluator '{ evaluator .eval_name } '. The experiment will be empty.{ bcolors .ENDC } "
1676+ )
16761677
16771678 results = []
16781679 for task in std_tqdm (tasks , desc = f"{ evaluator .eval_name } (tasks)" , position = position , disable = position is None ):
0 commit comments