Repository navigation
Run the Q-GaLore tests from the normal pytest job, not a workflow of their own - #10898
Conversation
…their own #10841 added .github/workflows/q-galore-tests.yml to give tests/utils/test_q_galore.py a home, because `Repo tests (CPU)` passes --ignore=tests/utils and the file therefore ran in no job at all. A whole workflow is the wrong shape for that. This drops it and adds the file to the Bucket-A list in consolidated-tests-ci.yml, which exists for exactly this case: CPU-runnable tests that live inside the --ignore'd directories. Added in both places that list has to stay in sync, the collect-only sanity step and the Bucket-A pytest step. That job already installs bitsandbytes>=0.45, so the optimizer tests resolve the same way they did in the standalone workflow. The deleted workflow ran pytest with --confcutdir=tests/utils. Nothing needs it: test_q_galore.py loads unsloth/optimizers/*.py through importlib specs rather than importing the unsloth package, so the GPU-spoof conftest neither helps nor hinders it. Checked, 34 passed under the repo conftest, which is how the Bucket-A job runs it. Also corrected the Bucket-A count in the header comment and the summary echo. Both said 21; the list held 23 before this change and 24 after.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
@codex security review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Why
#10841 landed with
.github/workflows/q-galore-tests.yml, a workflow whose only job was to run one test file. It existed becauseRepo tests (CPU)passes--ignore=tests/utils, sotests/utils/test_q_galore.pyran in no job at all. The coverage gap was real; a dedicated workflow was the wrong way to close it.consolidated-tests-ci.ymlalready has a Bucket-A step for precisely this case, described in its own header as the CPU-runnable tests that live inside the--ignored directories.test_q_galore.pybelongs there.What changed
.github/workflows/q-galore-tests.yml.tests/utils/test_q_galore.pyto both places the Bucket-A list has to stay in sync: the collect-only sanity step and the Bucket-A pytest step.The
--confcutdirflag is not neededThe deleted workflow ran pytest with
--confcutdir=tests/utils, which skippedtests/conftest.py, the GPU-free harness. Nothing requires that.test_q_galore.pyloadsunsloth/optimizers/*.pythroughimportlibspecs rather than importing theunslothpackage, so the spoof neither helps nor hinders it.Checked both ways rather than assumed: 34 passed under the repo conftest, which is how the Bucket-A job runs it, and the same 34 with the flag.
What this costs, stated plainly
The standalone workflow ran a bitsandbytes version axis (0.45.5 / 0.49.2 / 0.50.2). The Bucket-A job installs a single
bitsandbytes>=0.45, so that axis does not survive the move.That coverage is not being dropped, it is moving to where the repo already keeps this kind of check.
tests/version_compat/test_bitsandbytes_pinned_symbols.pyis parametrised over exactly these tags (0.45.5,0.47.0,0.49.2,main) and reads the upstream source directly, with no install. TheOptimizer2State.__init__signature assertion goes there, in #10874, alongside the fix that makes it pass. Putting it onmaintoday would just report the unfixed constructor as a failure.