Skip to content

Commit ae6182d

Browse files
committed
fix: clean up apps sdk imports
1 parent 3df2237 commit ae6182d

18 files changed

Lines changed: 9 additions & 27 deletions

‎examples/apps/gpu_inference.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def matmul_benchmark(size: int = 4096):
2828
torch.cuda.synchronize()
2929
start = time.time()
3030
for _ in range(10):
31-
result = a @ b
31+
_ = a @ b
3232
torch.cuda.synchronize()
3333
elapsed = time.time() - start
3434

‎runpod/apps/api.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ async def _reader():
362362
try:
363363
await self._put_tarball(upload_url, _reader(), total, timeout)
364364
return
365-
except (aiohttp.ClientError, OSError) as exc:
365+
except (aiohttp.ClientError, OSError):
366366
if attempt == attempts - 1:
367367
raise
368368
await asyncio.sleep(2**attempt)

‎runpod/apps/placement.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def solve_placement(
204204
raise PlacementError(
205205
f"cannot place volume '{volume_name}': no datacenter can host "
206206
f"every resource using it\n" + "\n".join(lines) + "\n"
207-
f"use separate volumes or compatible hardware"
207+
"use separate volumes or compatible hardware"
208208
)
209209

210210
# maximin: rank each DC by the worst resource's stock there,

‎runpod/apps/volume.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ async def resolve(
127127
if cached is not None:
128128
return cached
129129

130-
from .placement import PlacementError, StockMap, solve_placement
130+
from .placement import StockMap, solve_placement
131131

132132
client = await self._client()
133133
existing = await client.list_network_volumes()

‎runpod/rp_cli/console.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
TextColumn,
1919
)
2020
from rich.spinner import SPINNERS
21-
from rich.text import Text
2221
from rich.theme import Theme
2322

2423
# -- brand ----------------------------------------------------------------

‎runpod/runtimes/api/server.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def _build_class_app(handle) -> Any:
9292
"""
9393
from contextlib import asynccontextmanager
9494

95-
from fastapi import FastAPI, Request
95+
from fastapi import FastAPI
9696

9797
cls = handle._cls
9898
instance = cls()

‎tests/e2e/matrix/main.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
"""
66

77
import runpod
8-
from runpod import App
98

10-
app = App("e2e-matrix")
9+
app = runpod.App("e2e-matrix")
1110

1211

1312
# -- queue permutations ------------------------------------------------

‎tests/e2e/matrix/run.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
from main import ( # noqa: E402
1616
Svc,
17-
app,
1817
q_basic,
1918
q_caller,
2019
q_custom,

‎tests/test_apps/test_api_client.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""unit tests for the apps control-plane client."""
22

3-
import asyncio
43
from unittest.mock import AsyncMock, MagicMock, patch
54

65
import aiohttp

‎tests/test_apps/test_api_server.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
pytest.importorskip("fastapi")
99
from fastapi.testclient import TestClient
1010

11-
import runpod
1211
from runpod.apps.app import _clear_registry
1312
from runpod.runtimes.api import server
1413

0 commit comments

Comments
 (0)