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
Point the interrupt legs at the phase label the installer prints (#11342)
Daniel Hanb4c23b1ea2d6
diff --git a/.github/ci/interrupted-install-matrix.yml b/.github/ci/interrupted-install-matrix.ymlindex e147f3dfd3f..3eae7bfcb1a 100644--- a/.github/ci/interrupted-install-matrix.yml+++ b/.github/ci/interrupted-install-matrix.yml@@ -15,7 +15,7 @@ interrupt:# A marker, never a delay: every label prints BEFORE its work, so the kill lands inside# the phase, while a timed wait bets on phase duration and twice turned a leg into a# duplicate of the next one. This one is the reported case, killed installing structlog.- - {os: macos-15, label: studio-deps, marker: 'studio deps', pr: true}+ - {os: macos-15, label: studio-deps, marker: 'Unsloth Studio deps', pr: true}# Coarse phases, earliest to latest, each leaving a different partial venv. No venv leg:# "Creating virtual environment" runs ~0.1s, shorter than any poll, so its kill always# landed in the NEXT phase and the leg duplicated this one.@@ -30,7 +30,7 @@ interrupt:# Killed before install_python_stack.py writes the manifest.- {os: macos-15, label: data-designer, marker: 'data designer deps', pr: false}# Linux: same teardown path, different package manager and process semantics.- - {os: ubuntu-latest, label: studio-deps, marker: 'studio deps', pr: false}+ - {os: ubuntu-latest, label: studio-deps, marker: 'Unsloth Studio deps', pr: false}- {os: ubuntu-latest, label: torch, marker: '\[TAURI:STEP\] Installing PyTorch', pr: true}# Windows has no process groups, so the kill path differs. Both legs are nightly only:@@ -38,5 +38,5 @@ interrupt:interrupt_windows:# install.ps1:121 parses `--no-torch`; `-SkipTorch` matches no case there and is# silently dropped. The torch leg must NOT skip torch or its marker never appears.- - {label: studio-deps, marker: 'studio deps', installArgs: '--tauri --no-torch --local', pr: false}+ - {label: studio-deps, marker: 'Unsloth Studio deps', installArgs: '--tauri --no-torch --local', pr: false}- {label: torch, marker: 'Installing PyTorch', installArgs: '--tauri --local', pr: false}diff --git a/tests/studio/test_install_matrix_selection.py b/tests/studio/test_install_matrix_selection.pyindex fb1abbe6e82..ed32626a95d 100644--- a/tests/studio/test_install_matrix_selection.py+++ b/tests/studio/test_install_matrix_selection.py@@ -238,3 +238,80 @@ def test_the_nightly_and_the_matrix_file_are_wired_into_the_trigger(name):continuefor needed in (matrix_file, ".github/scripts/select_install_matrix.py"):assert needed in paths, f"{name}: {trigger} paths do not list {needed}"+++# The interrupt legs kill the installer once a marker appears in its log, and a leg whose+# marker never appears asserts nothing: the installer runs to completion and the guard in+# the workflow fails it. That is what happened when #11254 renamed the dependency phase+# "studio deps" to "Unsloth Studio deps" for branding: the label is user-facing text, the+# matrix file is the only other place that spells it, and nothing coupled the two, so the+# workflow went red on main and on every pull request that ran it. A rename is cheap to+# make and expensive to find this way, so the coupling is pinned here, in a CPU test, and+# not in a ten-minute macOS leg.++# Per job, because the legs of one never run the installer of the other: a phrase renamed+# only in install.ps1 leaves the Windows leg unreachable while install.sh still carries it,+# and a single pooled text would call that green. install_python_stack.py is on both lists+# because both installers run it.+INSTALLER_SOURCES = {+ "interrupt": (+ "install.sh",+ # Where the [TAURI:STEP] lines come from, and where several phases are named.+ "studio/setup.sh",+ "studio/install_python_stack.py",+ ),+ "interrupt_windows": (+ "install.ps1",+ "studio/setup.ps1",+ "studio/install_python_stack.py",+ ),+}+++# What the installer's logger prepends, not what any phase is named.+_TAURI_TAG = re.compile(r"^\\\[TAURI:STEP\\\]\s*")+++def _installer_text(job: str) -> str:+ return "\n".join(+ (REPO / name).read_text(encoding = "utf-8", errors = "replace")+ for name in INSTALLER_SOURCES[job]+ )+++def _markers(matrix_file: str) -> list[tuple[str, str, str]]:+ out = []+ for job, legs in _legs(matrix_file).items():+ for leg in legs:+ if "marker" in leg:+ out.append((job, leg.get("label", "?"), leg["marker"]))+ return out+++ "job,label,marker",+ _markers(".github/ci/interrupted-install-matrix.yml"),+ ids = lambda v: str(v).replace(" ", "-"),+)+def test_every_interrupt_marker_is_text_the_installer_still_prints(job, label, marker):+ """The marker is an ERE handed to `grep -qE` against the install log+ (.github/scripts/interrupt-install.sh), so it is read the same way here.++ The `[TAURI:STEP]` tag is put on the line by the installer's own logger, never by the+ caller that names the phase, so it is checked once against the sources rather than+ expected beside each phrase.+ """+ sources = INSTALLER_SOURCES[job]+ text = _installer_text(job)+ phrase, tagged = _TAURI_TAG.subn("", marker)+ if tagged:+ assert "TAURI:STEP" in text, (+ f"{job}: none of {', '.join(sources)} emits a [TAURI:STEP] line, so every "+ f"tagged marker on this job is unreachable"+ )+ assert re.search(phrase, text), (+ f"{job}/{label}: no line in {', '.join(sources)} matches the marker "+ f"{marker!r}, so the installer this leg runs can never print it, the kill never "+ f"lands and the leg fails having interrupted nothing. Rename the marker with "+ f"the phase."+ )