Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Commit ·
c5c099c
1
Parent(s): 1826db9
fix: only set sleep_time for non-CPU-basic sandboxes
Browse files
agent/tools/sandbox_tool.py
CHANGED
|
@@ -89,7 +89,9 @@ async def _ensure_sandbox(
|
|
| 89 |
)
|
| 90 |
)
|
| 91 |
|
| 92 |
-
kwargs = {"owner": owner, "hardware": hardware, "token": token,
|
|
|
|
|
|
|
| 93 |
sb = await asyncio.to_thread(Sandbox.create, **kwargs)
|
| 94 |
session.sandbox = sb
|
| 95 |
|
|
|
|
| 89 |
)
|
| 90 |
)
|
| 91 |
|
| 92 |
+
kwargs = {"owner": owner, "hardware": hardware, "token": token, **create_kwargs}
|
| 93 |
+
if hardware != "cpu-basic":
|
| 94 |
+
kwargs["sleep_time"] = 1500
|
| 95 |
sb = await asyncio.to_thread(Sandbox.create, **kwargs)
|
| 96 |
session.sandbox = sb
|
| 97 |
|