unsloth/.github/workflows
Daniel Han 184141db99
Tests + CI guard: batched left-padded generation can never silently regress again (#1066, #3699) (#6145)
* Add regression guard for batched left-padded generation (#1066, #3699)

Three layers of tests plus a path-filtered CI workflow so the left-padding
position_ids / attention-mask bug class cannot silently return:

- tests/utils/test_prepare_inputs_ast_guard.py: import-free AST checks on
  _fast_prepare_inputs_for_generation (cumsum-from-mask branch present,
  cache_position only as fallback, no mask truncation, model families wired)
- tests/utils/test_prepare_inputs_leftpad.py: CPU behavioral unit test with
  synthetic left-padded masks and fake caches; exact expected position_ids
  for prefill and cached decode
- tests/utils/test_batched_leftpad_generation_gpu.py: optional GPU e2e,
  solo vs batched prefix match, skipped without CUDA
- .github/workflows/batch-inference-guard.yml: ubuntu-latest CPU job running
  the two deterministic layers on PRs touching unsloth/models/**

Validated: all pass on main; both CPU layers fail at 6d0f8643~1 (pre #4100)
and at 332eabf3~1 (pre #2216), reproducing the historical bug signatures.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cite staging proof in batch-inference-guard header (staging-2 PRs 170/171)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fold left-padding guard into consolidated Core CI; merge AST + behavioral tests

No new workflow and no new CI job: the guard now runs as one HARD GATE step
inside consolidated-tests-ci.yml, right after the callback signature drift
detector, where the CPU torch stack is already installed. The AST structural
checks and the behavioral unit tests live in a single file
(tests/utils/test_prepare_inputs_leftpad.py); the AST layer stays stdlib-only
with unsloth imported lazily inside the behavioral tests, so import breakage
cannot mask the structural checks.

Revalidated after the merge: 11 assertions pass on main, 8 fail at
6d0f8643~1 (pre #4100).

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update staging proof reference for consolidated gate (PRs 170/172)

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-06-10 08:00:28 -07:00
..
consolidated-tests-ci.yml Tests + CI guard: batched left-padded generation can never silently regress again (#1066, #3699) (#6145) 2026-06-10 08:00:28 -07:00
lint-ci.yml studio: ROCm cleanups follow-up to #5301 (#5874) 2026-05-30 03:06:47 -07:00
lockfile-audit.yml ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
mlx-ci.yml ci: route every hf download through xet-tuned stall-retry wrapper (#5476) 2026-05-15 21:11:56 -07:00
notebooks-ci.yml ci: install unsloth_zoo from git main in notebooks-ci + studio-backend-ci (#5802) 2026-05-27 01:35:13 -07:00
release-desktop.yml Fix Windows workflow issues(#5694) 2026-05-22 05:32:30 -07:00
security-audit.yml ci(security-audit): make package installs network-resilient (#5853) 2026-05-31 01:46:55 -07:00
stale.yml CI: scope GITHUB_TOKEN permissions, add MLX CI, unblock ~60 skipped tests (#5312) 2026-05-11 03:19:13 -07:00
studio-api-smoke.yml ci: route every hf download through xet-tuned stall-retry wrapper (#5476) 2026-05-15 21:11:56 -07:00
studio-backend-ci.yml studio/setup.sh: cope with fresh CUDA toolkits like 13.3 (#5826) 2026-05-29 05:09:20 -07:00
studio-frontend-ci.yml Frontend CI: hard-fail unreviewed npm install scripts (#6139) 2026-06-10 06:10:16 -07:00
studio-inference-smoke.yml Fix JSON-mode smoke on Linux: bump quant, keep the hard Paris assert (#6138) 2026-06-10 06:10:03 -07:00
studio-load-orchestrator-ci.yml studio: unblock /load event loop on detect_audio_type (#5642, #5635) (#5669) 2026-05-22 05:47:58 -07:00
studio-mac-api-smoke.yml studio: pick a macOS llama.cpp prebuilt that loads on the host OS (#5883) 2026-05-31 00:59:25 -07:00
studio-mac-inference-smoke.yml Studio CI: tolerate transient artifact-upload flakes on diagnostic log steps (#5913) 2026-06-01 02:55:54 -07:00
studio-mac-install-matrix.yml studio: pick a macOS llama.cpp prebuilt that loads on the host OS (#5883) 2026-05-31 00:59:25 -07:00
studio-mac-ui-smoke.yml studio: pick a macOS llama.cpp prebuilt that loads on the host OS (#5883) 2026-05-31 00:59:25 -07:00
studio-mac-update-smoke.yml studio: pick a macOS llama.cpp prebuilt that loads on the host OS (#5883) 2026-05-31 00:59:25 -07:00
studio-tauri-smoke.yml ci: drop cache: 'npm' from setup-node (silent abort on Windows) (#5474) 2026-05-15 20:49:05 -07:00
studio-ui-smoke.yml Studio: IME / multilingual composer regression test + RTL dir="auto" (#5485) 2026-05-17 04:20:46 -07:00
studio-update-smoke.yml Move uninstall scripts into scripts/ and fix references (#5644) 2026-05-20 04:42:03 -07:00
studio-windows-api-smoke.yml ci: unblock Studio Windows + Linux + Mac smoke (#5741) 2026-05-23 06:59:16 -07:00
studio-windows-inference-smoke.yml Merge moe-lora-target-fix CI fixes 2026-06-08 20:20:00 +05:30
studio-windows-ui-smoke.yml ci: unblock Studio Windows + Linux + Mac smoke (#5741) 2026-05-23 06:59:16 -07:00
studio-windows-update-smoke.yml ci: unblock Studio Windows + Linux + Mac smoke (#5741) 2026-05-23 06:59:16 -07:00
version-compat-ci.yml tests: pinned-symbol canary for unsloth-zoo save_pretrained_merged guards (#5410) (#5433) 2026-05-17 01:35:28 -07:00
wheel-smoke.yml ci: drop cache: 'npm' from setup-node (silent abort on Windows) (#5474) 2026-05-15 20:49:05 -07:00