The platform for continuously improving AI agents.
fix vllm dev env issue (#295)
Rohit Gupta556e83809b42
diff --git a/overbae/modal/modal_vllm_worker.py b/overbae/modal/modal_vllm_worker.pyindex b49f9ebe..ffd2548c 100644--- a/overbae/modal/modal_vllm_worker.py+++ b/overbae/modal/modal_vllm_worker.py@@ -37,7 +37,7 @@ from modal_shared.serving.args import lora_load_requestfrom modal_shared.serving.artifacts import BASE_MANIFEST, read_base_manifestMODAL_ENVIRONMENT = os.environ.get("MODAL_ENVIRONMENT", "overmind-dev")-IS_PROD = MODAL_ENVIRONMENT == "overmind-prod"+IS_DEV = MODAL_ENVIRONMENT == "overmind-dev"MINUTES = 60 # seconds@@ -345,9 +345,9 @@ class _BaseVLLMWorker:full_path = f"{WEIGHTS_MOUNT}/{self.model_path}"# /sleep and /wake_up exist only in dev mode, and a snapshot engine calls both.- # Dev mode also returns exception stacks to clients.+ # Dev mode also returns exception stacks to clients. Staging matches production.needs_dev_routes = self.snapshot_weights or getattr(self, "snapshot_engine", False)- _os.environ["VLLM_SERVER_DEV_MODE"] = "1" if needs_dev_routes or not IS_PROD else "0"+ _os.environ["VLLM_SERVER_DEV_MODE"] = "1" if needs_dev_routes or IS_DEV else "0"# A container's Volume mount is a point-in-time view, so weights RegisterAPIServer# commits after this container is scheduled stay invisible until reload(). Deploydiff --git a/tests/test_dedicated_lora_merge.py b/tests/test_dedicated_lora_merge.pyindex 84458f5e..b6698d1d 100644--- a/tests/test_dedicated_lora_merge.py+++ b/tests/test_dedicated_lora_merge.py@@ -71,7 +71,7 @@ def test_prod_snapshot_engine_enables_the_sleep_route(monkeypatch, tmp_path):(tmp_path / "base").mkdir()monkeypatch.setattr(serving, "WEIGHTS_MOUNT", str(tmp_path))monkeypatch.setattr(serving, "weights_vol", Mock())- monkeypatch.setattr(serving, "IS_PROD", True)+ monkeypatch.setattr(serving, "IS_DEV", False)monkeypatch.setattr(serving.subprocess, "Popen", Mock())monkeypatch.setattr(serving, "_wait_for_vllm", Mock())slept = Mock()