Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio smoke: report a transport failure instead of crashing on one (#10420)
Daniel Hanfb9bb4ea003e
diff --git a/tests/studio/playwright_loaded_models_indicator.py b/tests/studio/playwright_loaded_models_indicator.pyindex 0642ffd604c..6c37ffd94af 100644--- a/tests/studio/playwright_loaded_models_indicator.py+++ b/tests/studio/playwright_loaded_models_indicator.py@@ -366,7 +366,18 @@ def run(page, state: Runtime) -> None:for route in ("/hub", "/train", "/images"):page.goto(BASE + route, wait_until = "domcontentloaded")- page.wait_for_timeout(3000)+ # Wait for the card, not for the clock. This is a hard navigation: a+ # full SPA reload plus a loaded-models poll, and 3000ms was the only+ # fixed budget in this file that was not derived from SETTLE_MS. On a+ # loaded runner the first route overran it and all three then failed+ # together, which is what a fixed budget looks like when it is the+ # thing that is wrong. The check below is unchanged and still fails if+ # the card genuinely does not survive the navigation -- this only stops+ # a slow render from being read as a missing card.+ try:+ page.wait_for_selector(CARD, timeout = SETTLE_MS)+ except Exception:+ passcheck(f"card survives {route}", page.locator(CARD).count() > 0)# ── Hardware shapes a CUDA runner never produces ────────────────────diff --git a/tests/studio/studio_api_smoke.py b/tests/studio/studio_api_smoke.pyindex ab76297b2bb..d37403662d6 100644--- a/tests/studio/studio_api_smoke.py+++ b/tests/studio/studio_api_smoke.py@@ -100,6 +100,23 @@ def http(return exc.code, json.loads(raw)except (json.JSONDecodeError, UnicodeDecodeError):return exc.code, raw+ except (TimeoutError, ConnectionError, urllib.error.URLError) as exc:+ # A transport failure is a failed check, not a crashed run. Only+ # HTTPError was caught here, so a socket timeout propagated out of+ # http() and killed the script at module level: the traceback named+ # urlopen and the line number, and nothing about which endpoint had+ # been slow or what the rest of the suite would have said. Observed on+ # three unrelated PRs whose /v1/embeddings call hit the 30s ceiling.+ # Returned as status 0 so every existing `if code == 200 ... else+ # fail(...)` site reports it with its own diagnosis and the run+ # continues to the remaining sections.+ #+ # Emitted here as well as returned: the call sites report the status+ # code and not the body, so status 0 on its own would say a request+ # failed without saying that it timed out or after how long.+ detail = f"{type(exc).__name__}: {exc}"+ _emit(" NET ", f"{method} {path} failed after {timeout}s -- {detail}")+ return 0, {"error": detail, "timeout": timeout}def login(password: str) -> tuple[int, str | None]:@@ -449,7 +466,14 @@ code, body = http("/v1/embeddings",body = {"model": GGUF_REPO, "input": "hello"},headers = AUTH_HEADER,- timeout = 30,+ # This is the first request in the section that forces a model load, so it+ # pays the load on top of the embedding. Measured at 23.8s on a healthy+ # macOS runner against a 30s ceiling, i.e. 79% of budget, which is not a+ # margin: three unrelated PRs timed out here at exactly 30.0s on the same+ # base while main passed. Raised to leave room for a loaded runner rather+ # than to hide a slow endpoint -- if this starts taking 90s that is a real+ # regression and it will still be reported, now as a failed check.+ timeout = 90,)if code == 200 and isinstance(body, dict) and body.get("data"):ok("/v1/embeddings -> 200 with data")