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: fix tests turning main CI red/flaky (kill-process, install overrides, UI re-login) (#6419)
Daniel Han79b57fe038d4
diff --git a/studio/backend/tests/test_llama_cpp_wait_for_vram_settle.py b/studio/backend/tests/test_llama_cpp_wait_for_vram_settle.pyindex 7f1d0c8a42a..91979e3e0fb 100644--- a/studio/backend/tests/test_llama_cpp_wait_for_vram_settle.py+++ b/studio/backend/tests/test_llama_cpp_wait_for_vram_settle.py@@ -281,6 +281,7 @@ def test_kill_process_records_timestamp_on_actual_kill():backend = LlamaCppBackend.__new__(LlamaCppBackend)backend._process = Nonebackend._healthy = False+ backend._stats_logger = None # _kill_process stops it in finallybackend._stdout_thread = Nonebackend._llama_log_fh = Nonebackend._last_kill_monotonic = 0.0diff --git a/tests/python/test_no_torch_filtering.py b/tests/python/test_no_torch_filtering.pyindex f7a90fc6a87..22cf04a513f 100644--- a/tests/python/test_no_torch_filtering.py+++ b/tests/python/test_no_torch_filtering.py@@ -471,11 +471,15 @@ class TestInstallPythonStackSubprocessMock:# -- Normal Linux path (NO_TORCH=False, IS_MACOS=False, IS_WINDOWS=False) --def test_normal_linux_includes_overrides(self):- """Normal Linux: overrides.txt IS called."""+ """Normal Linux: the torchao override step IS called.++ The override step installs a torch-matched torchao spec via+ --force-reinstall (uv: --reinstall), not overrides.txt directly.+ """cmds = self._capture_install(no_torch = False, is_macos = False, is_windows = False)- assert self._cmds_contain_file(- cmds, "overrides.txt"- ), "overrides.txt should be called on normal Linux"+ assert any(+ "--reinstall" in cmd for cmd in cmds+ ), "torchao override step (--reinstall) should be called on normal Linux"def test_normal_linux_includes_triton(self):"""Normal Linux: triton-kernels.txt IS called."""diff --git a/tests/studio/playwright_chat_ui.py b/tests/studio/playwright_chat_ui.pyindex 4739d519d95..9cfb33d4272 100644--- a/tests/studio/playwright_chat_ui.py+++ b/tests/studio/playwright_chat_ui.py@@ -1430,7 +1430,16 @@ with sync_playwright() as p:# Re-login through the UI with NEW2 so the browser has a valid# access token for the /api/shutdown call (the previous one# was invalidated by the CLI rotation above).- page.goto(f"{BASE}/login")+ # The CLI rotation left a stale token, so the SPA auth guard can+ # client-side-redirect mid-navigation and abort this goto with+ # net::ERR_ABORTED. Resolve on domcontentloaded and tolerate the+ # abort; the password-field wait below confirms we reached /login.+ try:+ page.goto(f"{BASE}/login", wait_until = "domcontentloaded", timeout = 60_000)+ except Exception as exc:+ if "ERR_ABORTED" not in str(exc):+ raise+ info(f"goto /login aborted ({exc!r}); password-field wait will confirm /login")pw_field = page.locator("#password")pw_field.wait_for(state = "visible", timeout = 60_000)pw_field.fill(NEW2)