Skip to content

Commit c6fcd4e

Browse files
ekon15claude
andcommitted
ruff format
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 128ff58 commit c6fcd4e

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

py/src/braintrust/framework.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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):

py/src/braintrust/test_framework.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ def task_with_hooks(input, hooks):
531531
assert len(root_span) == 1
532532
assert root_span[0].get("tags") == None
533533

534+
534535
@pytest.mark.asyncio
535536
async def test_eval_enable_cache():
536537
state = BraintrustState()

0 commit comments

Comments
 (0)