Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/swerex/deployment/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class ModalDeploymentConfig(BaseModel):
"""Runtime timeout (default timeout for all runtime requests)
"""

deployment_timeout: float = 1800.0
deployment_timeout: float = 3600.0
"""Kill deployment after this many seconds no matter what.
This is a useful killing switch to ensure that you don't spend too
much money on modal.
Expand Down
8 changes: 6 additions & 2 deletions src/swerex/deployment/modal.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ def __init__(
logger: logging.Logger | None = None,
image: str | modal.Image | PurePath,
startup_timeout: float = 0.4,
runtime_timeout: float = 1800.0,
runtime_timeout: float = 3600.0,
modal_sandbox_kwargs: dict[str, Any] | None = None,
install_pipx: bool = True,
deployment_timeout: float = 1800.0,
deployment_timeout: float = 3600.0,
):
"""Deployment for modal.com. The deployment will only start when the
`start` method is being called.
Expand Down Expand Up @@ -209,6 +209,10 @@ async def start(
self,
):
"""Starts the runtime."""
if self._runtime is not None and self._sandbox is not None:
self.logger.warning("Deployment is already started. Ignoring duplicate start() call.")
return

self.logger.info("Starting modal sandbox")
self._hooks.on_custom_step("Starting modal sandbox")
t0 = time.time()
Expand Down
Loading