Skip to content

Commit b67f5f7

Browse files
committed
more helpful example docstrings
1 parent 6d95fc0 commit b67f5f7

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/runloop_api_client/sdk/async_benchmark.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ class AsyncBenchmark:
2929
>>> benchmark = runloop.benchmark.from_id("bmd_xxx")
3030
>>> info = await benchmark.get_info()
3131
>>> run = await benchmark.start_run(run_name="evaluation-v1")
32+
>>> for scenario_id in info.scenario_ids:
33+
... scenario = await runloop.scenario.from_id(scenario_id)
34+
... scenario_run = await scenario.run(benchmark_run_id=run.id, run_name="evaluation-v1")
3235
"""
3336

3437
def __init__(self, client: AsyncRunloop, benchmark_id: str) -> None:

src/runloop_api_client/sdk/benchmark.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ class Benchmark:
2929
>>> benchmark = runloop.benchmark.from_id("bmd_xxx")
3030
>>> info = benchmark.get_info()
3131
>>> run = benchmark.start_run(run_name="evaluation-v1")
32+
>>> for scenario_id in info.scenario_ids:
33+
... scenario = runloop.scenario.from_id(scenario_id)
34+
... scenario_run = scenario.run(benchmark_run_id=run.id, run_name="evaluation-v1")
3235
"""
3336

3437
def __init__(self, client: Runloop, benchmark_id: str) -> None:

0 commit comments

Comments
 (0)