Skip to content

Commit 6d95fc0

Browse files
committed
rename benchmark run() to start_run()
1 parent 1e71c1d commit 6d95fc0

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

src/runloop_api_client/sdk/async_benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AsyncBenchmark:
2828
Example:
2929
>>> benchmark = runloop.benchmark.from_id("bmd_xxx")
3030
>>> info = await benchmark.get_info()
31-
>>> run = await benchmark.run(run_name="evaluation-v1")
31+
>>> run = await benchmark.start_run(run_name="evaluation-v1")
3232
"""
3333

3434
def __init__(self, client: AsyncRunloop, benchmark_id: str) -> None:
@@ -87,7 +87,7 @@ async def update(
8787
**params,
8888
)
8989

90-
async def run(
90+
async def start_run(
9191
self,
9292
**params: Unpack[SDKBenchmarkStartRunParams],
9393
) -> AsyncBenchmarkRun:

src/runloop_api_client/sdk/async_benchmark_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ class AsyncBenchmarkRun:
1616
1717
Provides async methods for monitoring run status, managing the run lifecycle,
1818
and accessing scenario run results. Obtain instances via
19-
``benchmark.run()`` or ``benchmark.list_runs()``.
19+
``benchmark.start_run()`` or ``benchmark.list_runs()``.
2020
2121
Example:
2222
>>> benchmark = runloop.benchmark.from_id("bench-xxx")
23-
>>> run = await benchmark.run(run_name="evaluation-v1")
23+
>>> run = await benchmark.start_run(run_name="evaluation-v1")
2424
>>> info = await run.get_info()
2525
>>> scenario_runs = await run.list_scenario_runs()
2626
"""

src/runloop_api_client/sdk/benchmark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Benchmark:
2828
Example:
2929
>>> benchmark = runloop.benchmark.from_id("bmd_xxx")
3030
>>> info = benchmark.get_info()
31-
>>> run = benchmark.run(run_name="evaluation-v1")
31+
>>> run = benchmark.start_run(run_name="evaluation-v1")
3232
"""
3333

3434
def __init__(self, client: Runloop, benchmark_id: str) -> None:
@@ -87,7 +87,7 @@ def update(
8787
**params,
8888
)
8989

90-
def run(
90+
def start_run(
9191
self,
9292
**params: Unpack[SDKBenchmarkStartRunParams],
9393
) -> BenchmarkRun:

src/runloop_api_client/sdk/benchmark_run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ class BenchmarkRun:
1616
1717
Provides methods for monitoring run status, managing the run lifecycle,
1818
and accessing scenario run results. Obtain instances via
19-
``benchmark.run()`` or ``benchmark.list_runs()``.
19+
``benchmark.start_run()`` or ``benchmark.list_runs()``.
2020
2121
Example:
2222
>>> benchmark = runloop.benchmark.from_id("bench-xxx")
23-
>>> run = benchmark.run(run_name="evaluation-v1")
23+
>>> run = benchmark.start_run(run_name="evaluation-v1")
2424
>>> info = run.get_info()
2525
>>> scenario_runs = run.list_scenario_runs()
2626
"""

tests/sdk/test_async_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ async def test_run(self, mock_async_client: AsyncMock, benchmark_run_view: MockB
4545
mock_async_client.benchmarks.start_run = AsyncMock(return_value=benchmark_run_view)
4646

4747
benchmark = AsyncBenchmark(mock_async_client, "bmd_123")
48-
result = await benchmark.run(run_name="test-run", metadata={"key": "value"})
48+
result = await benchmark.start_run(run_name="test-run", metadata={"key": "value"})
4949

5050
assert isinstance(result, AsyncBenchmarkRun)
5151
assert result.id == benchmark_run_view.id

tests/sdk/test_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_run(self, mock_client: Mock, benchmark_run_view: MockBenchmarkRunView)
4545
mock_client.benchmarks.start_run.return_value = benchmark_run_view
4646

4747
benchmark = Benchmark(mock_client, "bmd_123")
48-
result = benchmark.run(run_name="test-run", metadata={"key": "value"})
48+
result = benchmark.start_run(run_name="test-run", metadata={"key": "value"})
4949

5050
assert isinstance(result, BenchmarkRun)
5151
assert result.id == benchmark_run_view.id

tests/smoketests/sdk/test_async_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def test_benchmark_run_and_cancel(self, async_sdk_client: AsyncRunloopSDK)
8282
)
8383

8484
# Start a run
85-
run = await benchmark.run(run_name="sdk-smoketest-async-benchmark-run")
85+
run = await benchmark.start_run(run_name="sdk-smoketest-async-benchmark-run")
8686
scenario = async_sdk_client.scenario.from_id(benchmark_data.scenario_ids[0])
8787
scenario_run = None
8888

tests/smoketests/sdk/test_benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def test_benchmark_run_lifecycle(self, sdk_client: RunloopSDK) -> None:
8080
)
8181

8282
# Start a run
83-
run = benchmark.run(run_name="sdk-smoketest-benchmark-run")
83+
run = benchmark.start_run(run_name="sdk-smoketest-benchmark-run")
8484
scenario = sdk_client.scenario.from_id(benchmark_data.scenario_ids[0])
8585
scenario_run = None
8686

0 commit comments

Comments
 (0)