Skip to content

test(q4_exllama_v2): gate the CUDA-only test and pin the revision kwarg (#5325 A8) - #6258

Merged
Qubitium merged 1 commit into
mainfrom
fix/5325a-issue
Nov 29, 2026
Merged

Qubitium merged 1 commit into
mainfrom
fix/5325a-issue

Conversation

@Qubitium

@Qubitium Qubitium commented Nov 29, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #5325 (item A8; A4/A15/A16 were already green on main — see below)

Scope, corrected

The original brief named items A4, A8, A15 and A16. On current main only A8 still needed anything:

item node status at 2d3261d
A4 test_concurrency_guards.py::test_cpu_bf16x3_capability_probe_respects_an_active_scope already green (fixed by merged #5564)
A15 test_torch_cpu_avx512.py::test_cpu_feature_detection_requires_{vbmi,xsave} already green (fixed by merged #5564)
A16 test_torch_cpu_avx512.py::test_fused_bias_validation already green (fixed by merged #5565)
A8 test_q4_exllama_v2.py still had a defect — see below

For A4/A15/A16 I reproduced each original failure by temporarily restoring its pre-fix body (AttributeError: 'function' object has no attribute 'cache_clear', and Failed: DID NOT RAISE RuntimeError), then confirmed the merged fixes are what make them green. No changes were made to those files, and no test was weakened.

What this PR changes

Two things in tests/test_q4_exllama_v2.py:

  1. Missing GPU gate. test_generation_desc_act_false was the only test in the class without a requires_nvidia_cuda() guard, so it failed on a CPU-only host with RuntimeError: No CUDA GPUs are available instead of skipping. Added the same guard its siblings use.
  2. CPU-runnable guard for the A8 typo. test_generation_desc_act_true needs CUDA plus the /monster/data/model/TinyLlama-1.1B-Chat-v1.0-GPTQ-4bit checkpoint, so the rivision= → revision= fix cannot be observed on this host. The new test_generation_desc_act_true_passes_the_revision_to_load spies on GPTQModel.load, runs the real test_generation_desc_act_true body against the spy, and asserts calls["revision"] == "desc_act_true" and "rivision" not in calls. A re-introduced typo now fails on CPU.

The revision=revision fix itself is already on main (line 175, from #5565); this PR only adds the guard that keeps it from regressing silently.

Red evidence

  • test_generation_desc_act_false on CPU at HEAD: RuntimeError: No CUDA GPUs are available
  • Re-introducing rivision=revision in test_generation_desc_act_true makes the new guard fail with KeyError: 'revision'

Green evidence

cd tests && CUDA_VISIBLE_DEVICES="" PYTHONPATH=<clone>:<clone>/tests \
  /root/venv/bin/python -m pytest test_q4_exllama_v2.py -q -rs -p no:cacheprovider
1 passed, 4 skipped
cd tests && CUDA_VISIBLE_DEVICES="" PYTHONPATH=<clone>:<clone>/tests \
  /root/venv/bin/python -m pytest test_concurrency_guards.py test_torch_cpu_avx512.py -q -p no:cacheprovider
50 passed
/root/venv/bin/ruff check tests/test_q4_exllama_v2.py
All checks passed!

Unverified

  • test_generation_desc_act_true itself was not run on hardware: this host has no NVIDIA CUDA and no /monster checkpoint. Its revision kwarg is covered by the CPU spy instead.

…on kwarg (#5325)

test_generation_desc_act_false loads a CUDA checkpoint without the
requires_nvidia_cuda() gate the other nodes use, so it fails on a CPU-only
host with 'RuntimeError: No CUDA GPUs are available'.

test_generation_desc_act_true is CUDA/checkpoint-only. Add a CPU-runnable spy
that asserts revision= (not rivision=) reaches GPTQModel.load, so the typo
fixed in #5565 cannot silently return.

Items A4/A15/A16 were already fixed on main by #5564/#5565 and are green at
2d3261d; verified without changes.
@Qubitium Qubitium changed the title test: repair stale capability and revision expectations (#5325) test(q4_exllama_v2): gate the CUDA-only test and pin the revision kwarg (#5325 A8) Nov 29, 2026
@Qubitium
Qubitium marked this pull request as ready for review November 29, 2026 12:45
@Qubitium
Qubitium merged commit 7aedf1b into main Nov 29, 2026
6 checks passed
@Qubitium
Qubitium deleted the fix/5325a-issue branch November 29, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant