Skip to content

Commit 56b98d6

Browse files
authored
Make parallel_evaluation_example more robust (#1861)
1 parent 57cc515 commit 56b98d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/evals.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,16 +333,16 @@ dataset = Dataset(
333333

334334

335335
async def double_number(input_value: int) -> int:
336-
"""Function that simulates work by sleeping for a second before returning double the input."""
336+
"""Function that simulates work by sleeping for a tenth of a second before returning double the input."""
337337
await asyncio.sleep(0.1) # Simulate work
338338
return input_value * 2
339339

340340

341341
# Run evaluation with unlimited concurrency
342342
t0 = time.time()
343343
report_default = dataset.evaluate_sync(double_number)
344-
print(f'Evaluation took less than 0.3s: {time.time() - t0 < 0.3}')
345-
#> Evaluation took less than 0.3s: True
344+
print(f'Evaluation took less than 0.5s: {time.time() - t0 < 0.5}')
345+
#> Evaluation took less than 0.5s: True
346346

347347
report_default.print(include_input=True, include_output=True, include_durations=False) # (1)!
348348
"""

0 commit comments

Comments
 (0)