unsloth/.github/workflows
Daniel Han 36f4cf48a6 CI(consolidated): spoof torch.cuda.is_available before bare unsloth_zoo imports
The first run on ubuntu-latest failed because three steps that import
unsloth_zoo outside pytest hit unsloth_zoo/device_type.py:233 ->
get_device_type() -> NotImplementedError on a GPU-less runner.

tests/conftest.py:84-141 already handles this for pytest by patching
torch.cuda.is_available before the unsloth_zoo import; this commit
mirrors that for the bare invocations:

- Clone step's sanity check: replaced `python -c "import unsloth_zoo, ..."`
  with `pip show unsloth_zoo | head -3`. Avoids the import entirely.
- test_apply_fused_lm_head step: switched to a Python heredoc that sets
  torch.cuda.is_available = lambda: True before importing
  unsloth_zoo.compiler. The function under test is pure regex; the spoof
  has no effect on its behavior.
- Summary step: replaced the unsloth_zoo version printout's import with
  `pip show`.

Pytest steps (Sanity collection-only, Bucket-A pytest, unsloth_zoo full
pytest) are unchanged; they continue to route through the existing
tests/conftest.py and unsloth_zoo's own tests/conftest.py spoofs.
2026-05-07 04:31:06 +00:00
..
consolidated-tests-ci.yml CI(consolidated): spoof torch.cuda.is_available before bare unsloth_zoo imports 2026-05-07 04:31:06 +00:00
lint-ci.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
mlx-ci.yml ci(mlx): fresh-process reloads + soft-skip GGUF on llama.cpp limitation 2026-05-07 04:12:21 +00:00
release-desktop.yml Fix Studio desktop tray installer and titlebar and bux fixes (#5179) 2026-04-30 08:40:39 -07:00
security-audit.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
stale.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-api-smoke.yml CI(studio): fix 4 real failures surfaced by the new smoke jobs 2026-05-07 04:20:11 +00:00
studio-backend-ci.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00
studio-frontend-ci.yml CI(studio): always-upload artifacts + gate /api/system + path/health plumbing 2026-05-07 04:09:09 +00:00
studio-inference-smoke.yml CI(studio): always-upload artifacts + gate /api/system + path/health plumbing 2026-05-07 04:09:09 +00:00
studio-tauri-smoke.yml CI(studio): always-upload artifacts + gate /api/system + path/health plumbing 2026-05-07 04:09:09 +00:00
studio-ui-smoke.yml CI(ui): add second Playwright job covering Compare/Recipes/Export/Studio/Settings 2026-05-07 04:09:09 +00:00
studio-update-smoke.yml CI(studio): always-upload artifacts + gate /api/system + path/health plumbing 2026-05-07 04:09:09 +00:00
wheel-smoke.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00