Skip to content

Run the Q-GaLore tests from the normal pytest job, not a workflow of their own - #10898

Merged
danielhanchen merged 2 commits into
mainfrom
fix/fold-q-galore-into-pytest
Sep 14, 2026
Merged

danielhanchen merged 2 commits into
mainfrom
fix/fold-q-galore-into-pytest

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Why

#10841 landed with .github/workflows/q-galore-tests.yml, a workflow whose only job was to run one test file. It existed because Repo tests (CPU) passes --ignore=tests/utils, so tests/utils/test_q_galore.py ran in no job at all. The coverage gap was real; a dedicated workflow was the wrong way to close it.

consolidated-tests-ci.yml already 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.py belongs there.

What changed

  • Deleted .github/workflows/q-galore-tests.yml.
  • Added tests/utils/test_q_galore.py to both places the Bucket-A list has to stay in sync: the collect-only sanity step and the Bucket-A pytest step.
  • Corrected the Bucket-A count in the header comment and the summary echo. Both said 21; the list actually held 23 before this change and 24 after, so the number was already stale.

The --confcutdir flag is not needed

The deleted workflow ran pytest with --confcutdir=tests/utils, which skipped tests/conftest.py, the GPU-free harness. Nothing requires that. test_q_galore.py loads unsloth/optimizers/*.py through importlib specs rather than importing the unsloth package, 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.py is parametrised over exactly these tags (0.45.5, 0.47.0, 0.49.2, main) and reads the upstream source directly, with no install. The Optimizer2State.__init__ signature assertion goes there, in #10874, alongside the fix that makes it pass. Putting it on main today would just report the unfixed constructor as a failure.

…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.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-14T04:04:25.877198Z 3c87cf8 Manual request
🔒 Security Review ✅ Completed 2026-09-14T04:05:15.112651Z 3c87cf8 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 3c87cf8917

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 3c87cf8917

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@danielhanchen
danielhanchen merged commit 7ef4ab4 into main Sep 14, 2026
8 of 12 checks passed
@danielhanchen
danielhanchen deleted the fix/fold-q-galore-into-pytest branch September 14, 2026 04:33
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