Skip to content

Commit acc264e

Browse files
committed
fix(eval): type casting timeout to int for Modal and Daytona
1 parent dd1e391 commit acc264e

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

hud/eval/runtime.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,11 +279,12 @@ async def __call__(self, task: Task) -> AsyncIterator[Runtime]:
279279
image=image,
280280
unencrypted_ports=[self.port],
281281
readiness_probe=modal.Probe.with_tcp(self.port),
282-
timeout=self.timeout,
282+
# Modal types both timeouts as int seconds; floats raise at proto encode.
283+
timeout=int(self.timeout),
283284
**extra,
284285
)
285286
try:
286-
await sb.wait_until_ready.aio(timeout=self.ready_timeout)
287+
await sb.wait_until_ready.aio(timeout=int(self.ready_timeout))
287288
host, port = (await sb.tunnels.aio())[self.port].tcp_socket
288289
yield Runtime(
289290
f"tcp://{host}:{port}",
@@ -365,7 +366,7 @@ async def __call__(self, task: Task) -> AsyncIterator[Runtime]:
365366
async with AsyncDaytona() as daytona:
366367
snapshot = await self._ensure_snapshot(daytona)
367368
sandbox = await daytona.create(
368-
CreateSandboxFromSnapshotParams(snapshot=snapshot), timeout=self.create_timeout
369+
CreateSandboxFromSnapshotParams(snapshot=snapshot), timeout=int(self.create_timeout)
369370
)
370371
try:
371372
# Start the env server in a background session (the snapshot's CMD is

0 commit comments

Comments
 (0)