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
Mac CI: run the permission and loaded-models indicator suites alongside the UI suites (#15703)
Jonathan Chene002fda9f78c
diff --git a/.github/workflows/studio-mac-ui-smoke.yml b/.github/workflows/studio-mac-ui-smoke.ymlindex 341b5a49797..19c33147e46 100644--- a/.github/workflows/studio-mac-ui-smoke.yml+++ b/.github/workflows/studio-mac-ui-smoke.yml@@ -339,14 +339,24 @@ jobs:kill "${STUDIO_PID}" 2>/dev/null || truesleep 2- - name: Cross-browser permission controls- run: |- bash .github/scripts/run-studio-permission-browser.sh 18895 webkit-- # WKWebView is what the desktop app embeds; status reads are stubbed.- - name: Loaded-models indicator (WebKit)+ # Model-free suites on their own ports and home (the scripts wipe auth/ per boot). Started+ # after the chat UI, which ran ~2x slower when sharing the runner.+ - name: Cross-browser permission controls + loaded-models indicator (WebKit)+ id: webkit_lane+ background: truerun: |- bash .github/scripts/run-studio-indicator-browser.sh 18899 webkit+ installed_home="$HOME/.unsloth/studio"+ test -x "$installed_home/unsloth_studio/bin/python" \+ || { echo "::error::no studio venv under $installed_home"; exit 1; }+ home="${{ github.workspace }}/.studio-webkit-lane"+ mkdir -p "$home"+ ln -sfn "$installed_home/unsloth_studio" "$home/unsloth_studio"+ export UNSLOTH_STUDIO_HOME="$home"+ rc=0+ bash .github/scripts/run-studio-permission-browser.sh 18895 webkit || rc=1+ # WKWebView is what the desktop app embeds; status reads are stubbed.+ bash .github/scripts/run-studio-indicator-browser.sh 18899 webkit || rc=1+ exit "$rc"- name: Reset auth + boot Unsloth for extra UI tests (port 18897)run: |@@ -440,6 +450,10 @@ jobs:kill "${STUDIO_EXTRA_PID}" 2>/dev/null || truesleep 2+ # Before the tab smoke, whose cold boot needs the runner to itself.+ - name: Wait for the permission controls + loaded-models indicator+ wait: webkit_lane+# ---------------------------------------------------------------# Own cold-port boot with no health wait: a settled backend is the wrong start state.# The script pins /api/health at hardware_detecting=true itself, so no timing is assumed.diff --git a/tests/studio/test_mac_bundled_job_phases.py b/tests/studio/test_mac_bundled_job_phases.pyindex f0a06439e9a..a32f82a03a3 100644--- a/tests/studio/test_mac_bundled_job_phases.py+++ b/tests/studio/test_mac_bundled_job_phases.py@@ -166,3 +166,53 @@ def test_the_absorbed_phases_keep_the_host_offload_opt_out(job: dict) -> None:"GitHub's macOS runners have a paravirtual Metal device, so every phase here ""runs the whole model from host RAM and the guard declines the load.")+++def test_every_background_step_is_collected_before_the_uninstall(steps: list[dict]) -> None:+ """A background suite still running when the uninstall phase starts loses its venv mid-run."""+ names = [str(s.get("name") or "") for s in steps]+ uninstall = names.index("Uninstall and verify clean")+ # In step order: a wait-all collects only the background steps already started.+ running: set[str] = set()+ started = 0+ for step in steps[:uninstall]:+ if step.get("background"):+ name = step.get("name")+ assert step.get("id"), f"background step {name!r} has no id, so no wait can name it"+ running.add(step["id"])+ started += 1+ if "wait-all" in step:+ running.clear()+ waits = step.get("wait")+ running -= set([waits] if isinstance(waits, str) else waits or [])+ assert started, "no background steps found; this scan would be vacuous"+ missing = sorted(running)+ assert not missing, (+ f"background steps {missing} have no `wait` or `wait-all` before the uninstall phase, "+ f"so they can still be running when it deletes the install they use"+ )+++def test_a_background_studio_boot_gets_its_own_studio_home(steps: list[dict]) -> None:+ """The boot scripts wipe $studio_home/auth, so the default home races the foreground phase's login."""+ boots = (+ "run-studio-permission-browser.sh",+ "run-studio-indicator-browser.sh",+ "boot-studio-api-only.sh",+ )+ lanes = [s for s in steps if s.get("background") and any(b in _script(s) for b in boots)]+ assert lanes, "no background step boots a server; this scan would be vacuous"+ for lane in lanes:+ text = _script(lane) + "\n" + yaml.safe_dump(lane.get("env") or {})+ assigned = dict(re.findall(r'(?m)^\s*(?:export\s+)?(\w+)[=:]\s*"?([^"\n]+)', text))+ # Follows one shell hop, e.g. UNSLOTH_STUDIO_HOME="$home".+ home = re.sub(+ r"\$\{?(\w+)\}?",+ lambda m: assigned.get(m.group(1), m.group(0)),+ assigned.get("UNSLOTH_STUDIO_HOME", ""),+ )+ assert "github.workspace" in home, (+ f"{lane.get('name')!r} boots Unsloth in the background with UNSLOTH_STUDIO_HOME="+ f"{home!r}, not a home of its own under the workspace, so it shares the auth dir "+ f"the foreground phase wipes and re-mints"+ )