Make the NO_CLI legs assert repair, and fix the Windows straggler sweep
Two of the interrupted-install legs were passing without testing anything.
The re-run assertion skipped verdict=NO_CLI, but a kill at "venv" or "torch"
lands before install.sh ever prints "Installing Unsloth" (:2125, :3667, :3961),
so those legs can only ever produce NO_CLI. Three non-gating-exempt cells
(macos-14 kill@venv, macos-14 kill@torch, ubuntu-latest kill@torch) therefore
asserted nothing beyond a marker appearing in a log. NO_CLI is now included:
a re-run must produce a booting backend regardless of how little the first run
managed to install. Each re-run step grows an existence check first, because
the probe exits without writing verdict.json when the binary is absent and the
json.load would crash rather than report.
The Windows straggler sweep matched nothing at all. UNSLOTH_STUDIO_HOME arrives
as D:\a\r\r/.studio-home, since the workflow joins ${{ github.workspace }} with
a forward slash, while Process.Path is all backslashes, so the literal -like
missed even the venv's own python.exe. uv is never under the studio home in any
case: install.ps1 takes it from winget or astral.sh. Normalise the separators,
match uv by name (the runner is ephemeral and runs no other uv), and skip the
home comparison entirely when the variable is empty, which would otherwise turn
the pattern into "**" and kill every python on the runner.
This commit is contained in:
parent
80fc65dfe3
commit
3e7fc344bb
2 changed files with 38 additions and 11 deletions
21
.github/scripts/interrupt-install.ps1
vendored
21
.github/scripts/interrupt-install.ps1
vendored
|
|
@ -81,11 +81,22 @@ if (-not $killed -and -not $proc.HasExited) { if (-not $reason) { $reason = 'dea
|
|||
if ($killed) {
|
||||
Write-Host "[interrupt] killing process tree of $($proc.Id) ($reason)"
|
||||
Stop-Tree $proc.Id
|
||||
# Any straggler uv/python that reparented away from the installer.
|
||||
foreach ($name in 'uv', 'python') {
|
||||
Get-Process -Name $name -ErrorAction SilentlyContinue |
|
||||
Where-Object { $_.Path -and $_.Path -like "*$env:UNSLOTH_STUDIO_HOME*" } |
|
||||
ForEach-Object { try { Stop-Process -Id $_.Id -Force } catch { } }
|
||||
# Any straggler uv/python that reparented away from the installer. The old sweep
|
||||
# matched nothing: UNSLOTH_STUDIO_HOME arrives as `D:\a\r\r/.studio-home`
|
||||
# (github.workspace joined with a forward slash) while Process.Path is all
|
||||
# backslashes, so the literal -like missed even the venv's own python, and uv is
|
||||
# never under the studio home anyway (install.ps1 takes it from winget or
|
||||
# astral.sh). Normalise the separators, and take uv by name since the runner is
|
||||
# ephemeral and runs no other uv.
|
||||
$homeNorm = if ([string]::IsNullOrWhiteSpace($env:UNSLOTH_STUDIO_HOME)) { $null }
|
||||
else { ($env:UNSLOTH_STUDIO_HOME -replace '/', '\').TrimEnd('\') }
|
||||
foreach ($p in @(Get-Process -Name 'uv', 'python', 'pythonw' -ErrorAction SilentlyContinue)) {
|
||||
$path = $null
|
||||
try { $path = $p.Path } catch { }
|
||||
$inHome = $homeNorm -and $path -and ($path -like "$homeNorm\*")
|
||||
if ($p.ProcessName -eq 'uv' -or $inHome) {
|
||||
try { Stop-Process -Id $p.Id -Force; Write-Host "[interrupt] swept $($p.ProcessName) pid=$($p.Id)" } catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue