unsloth/.github/workflows
Daniel Han 6ec6ca39ef ci: add cross-version compat canary for vLLM, TRL, PEFT, ST, bnb
Catches upstream API drift early — before a PyPI release breaks user
workloads. For each tracked package + version, fetch the relevant
source files from raw.githubusercontent.com and grep for the symbols
unsloth + unsloth-zoo monkey-patch, subclass, or eval-import. No pip
install required, CPU-only, runs PR-time + daily cron.

Files:
- tests/vllm_compat/test_vllm_pinned_symbols.py
    extend VLLM_TAGS from {0.9.0..0.15.0} to include
    {0.16.0, 0.17.1, 0.18.1, 0.19.1, 0.20.1, main}.
- tests/version_compat/_fetch.py
    shared fetch + grep helpers (fetch_text / has_def / first_match).
- tests/version_compat/test_trl_grpo_pinned_symbols.py
    12 TRL tags (0.18.2 -> v1.3.0 + main) covering the supported
    window (pyproject pin trl>=0.18.2,!=0.19.0,<=0.24.0) plus
    above-cap canaries. Asserts:
      * top-level GRPOTrainer / GRPOConfig / SFTTrainer / SFTConfig
        re-exports (used by `from trl import X`)
      * trl.trainer.grpo_trainer.GRPOTrainer class
      * trl.trainer.grpo_config.GRPOConfig (or grpo_trainer.py fallback)
      * DataCollatorForPreference reachable from EITHER dpo_trainer or
        utils (rl_replacements.py:318 string-emits the dpo_trainer path)
      * trl.trainer.utils.pad (rl_replacements.py:326)
      * unwrap_model_for_generation in any known submodule
        (rl.py:152-155 try/except handles both)
      * trl.experimental.openenv (gated; rl_replacements.py:1765-1770)
      * trl.generation.vllm_generation (gated; rl_replacements.py:1846)
      * trl.__version__ exported via literal / submodule / metadata
- tests/version_compat/test_peft_pinned_symbols.py
    5 PEFT tags (0.18.0 -> 0.19.1 + main). Asserts:
      * top-level LoraConfig / get_peft_model / PeftModel
      * peft.tuners.lora.LoraConfig at canonical path
      * get_peft_model in mapping.py / mapping_func.py
        (peft 0.18 split this out)
      * peft.tuners.lora.LoraLayer
      * peft.tuners.lora.bnb (Linear4bit / Linear8bitLt)
- tests/version_compat/test_sentence_transformers_pinned_symbols.py
    6 ST tags (5.0.0 -> 5.4.1 + main). Handles BOTH layouts:
      legacy (< 5.4): sentence_transformers/models[.py|/__init__.py]
      modular (>= 5.4): classes under
        sentence_transformers/base/modules/*
        sentence_transformers/sentence_transformer/modules/*
      Plus verifies the deprecated-import shim
      (`setup_deprecated_module_imports`) is wired in __init__.py
      so `from sentence_transformers.models import Pooling` keeps
      working for unsloth/models/sentence_transformer.py.
- tests/version_compat/test_bitsandbytes_pinned_symbols.py
    4 bnb tags (0.45.5 -> 0.49.2 + main; skip the broken 0.46.0 /
    0.48.0 listed in pyproject !=). Asserts:
      * bnb.functional.{dequantize_4bit, quantize_4bit}
      * bnb.nn.{Linear4bit, Params4bit}
- .github/workflows/version-compat-ci.yml
    7 jobs:
      * vllm-pinned-symbols  (existing tests/vllm_compat/, now wired)
      * trl-grpo-pinned-symbols
      * peft-pinned-symbols
      * st-pinned-symbols
      * bitsandbytes-pinned-symbols
      * zoo-imports-under-spoof  (real pip install + CUDA spoof,
        unsloth_zoo.{rl_replacements, empty_model, vllm_utils,
        vllm_lora_*} import smoke)
      * daily-fresh-fetch (cron-only superset)
    Triggers: pull_request (paths), daily 06:43 UTC, workflow_dispatch.
    Authenticated GitHub raw fetches (GITHUB_TOKEN) for the 5000 req/h
    quota.

Smoke-tested locally: 226 pass, 15 skipped (gated optional features).
2026-05-08 11:58:24 +00:00
..
consolidated-tests-ci.yml ci(consolidated): prune electra from KNOWN_BROKEN_COMPILE post-zoo#632 2026-05-08 11:25:27 +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): unpin unsloth_zoo from PR #627 branch now that it is merged 2026-05-08 11:21:31 +00:00
notebooks-ci.yml ci(notebooks): diff Colab oracle against committed snapshots 2026-05-08 11:39:38 +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 Revert tool-calling trim on Linux + Windows; keep Mac 2026-05-08 09:39:12 +00:00
studio-mac-api-smoke.yml ci(mac): add Mac Studio API/UI/GGUF CI workflows 2026-05-07 05:14:51 +00:00
studio-mac-inference-smoke.yml ci(inference): port main's --local-dir gguf-cache pattern to tool-calling jobs 2026-05-08 09:10:57 +00:00
studio-mac-ui-smoke.yml ci(mac): single-process Chromium + JSON.parse try/catch in pipeTransport 2026-05-07 11:05:32 +00:00
studio-mac-update-smoke.yml ci(mac): add Mac Studio Update CI 2026-05-07 05:08:43 +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(update-smoke): drop cache: 'pip' to avoid fatal post-step 2026-05-07 07:38:26 +00:00
studio-windows-api-smoke.yml ci(windows): do not pre-create dist/node_modules before Defender exclusion 2026-05-08 09:08:46 +00:00
studio-windows-inference-smoke.yml Revert tool-calling trim on Linux + Windows; keep Mac 2026-05-08 09:39:12 +00:00
studio-windows-ui-smoke.yml ci(windows): do not pre-create dist/node_modules before Defender exclusion 2026-05-08 09:08:46 +00:00
studio-windows-update-smoke.yml ci(windows): do not pre-create dist/node_modules before Defender exclusion 2026-05-08 09:08:46 +00:00
version-compat-ci.yml ci: add cross-version compat canary for vLLM, TRL, PEFT, ST, bnb 2026-05-08 11:58:24 +00:00
wheel-smoke.yml CI: SHA-pin every action; fix 4 bugs in advisory-audit 2026-05-07 01:12:40 +00:00