Require bitsandbytes>=0.50.0 and drop the _check_is_size warning filter - #6893
Open
behroozazarkhalili wants to merge 2 commits into
Open
Require bitsandbytes>=0.50.0 and drop the _check_is_size warning filter#6893behroozazarkhalili wants to merge 2 commits into
behroozazarkhalili wants to merge 2 commits into
Conversation
… filter bitsandbytes called the deprecated `torch._check_is_size` in its quantization ops, so every PEFT + quantization test emitted a `FutureWarning` that TRL silenced with a pytest filter. bitsandbytes 0.50.0 replaced every one of those calls with `torch._check` (bitsandbytes-foundation/bitsandbytes#1940, merged 2026-05-07). Counted at the release tags, `bitsandbytes/_ops.py` holds 8 occurrences of `_check_is_size` at 0.49.2 and 0 at both 0.50.0 and 0.50.1, so raising the floor to 0.50.0 makes the filter dead. Requiring the minimum is what lets the filter go: the resolver was already picking up 0.50.1, but nothing recorded that TRL depends on it. The remaining bitsandbytes filter, for the blocksize-alignment warning, stays. Its upstream issue (bitsandbytes-foundation/bitsandbytes#2027) is still open. Resolves #6447
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
…ytes-drop-check-is-size-filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #6447.
What
Raises the bitsandbytes floor to
>=0.50.0in thequantizationanddevextras, and removes the pytest filter that silenced its_check_is_sizeFutureWarning.Why the trigger has fired
bitsandbytes replaced every
torch._check_is_sizecall withtorch._checkin bitsandbytes-foundation/bitsandbytes#1940, merged 2026-05-07 and shipped in 0.50.0 (2026-07-25). Counted directly at the release tags rather than inferred from dates:_check_is_sizeinbitsandbytes/_ops.pyThe resolver already picks up 0.50.1 today, so the filter is dead in practice. Recording the minimum is what makes that a guarantee instead of a coincidence, which is the condition the issue names.
Verification
Applying each version of the
filterwarningslist programmatically and then callingtorch._check_is_size(1):Exactly one entry is removed and it is the intended one. Boundary check on the new specifier: 0.49.2 does not satisfy
>=0.50.0, 0.50.0 and 0.50.1 do. Both requirement strings parse as valid PEP 508.pytest --collect-onlystill loads the config (231 tests collected intests/test_utils.py).Scanning the installed environment, only bitsandbytes and torch itself call
_check_is_size. torch's remaining callers are infx/passes/runtime_assert.py,fx/experimental/symbolic_shapes.py,_dynamo/trace_rules.py, andexport/_patches.py, none of which sit on TRL's eager training path, so removing the filter does not unmask a second source.Out of scope
The other bitsandbytes filter,
inner dimension (\d+) is not aligned for fast kernel, stays. Its upstream issue bitsandbytes-foundation/bitsandbytes#2027 is still open, so its "remove once" condition has not been met.Sibling issue #6466 is not yet actionable either: it needs triton >= 3.8.0 and the latest release on PyPI is 3.7.1.
Note
Low Risk
Dependency floor and pytest warning-filter cleanup only; no runtime or security logic changes. Users on bitsandbytes < 0.50.0 will need to upgrade when using the quantization extra.
Overview
Pins
bitsandbytesto>=0.50.0in thequantizationanddevextras so the library no longer uses deprecatedtorch._check_is_size.Removes the matching pytest
filterwarningsentry for thatFutureWarning, which is fixed upstream in 0.50.0. Other bitsandbytes warning filters are unchanged.Reviewed by Cursor Bugbot for commit aed39ef. Bugbot is set up for automated code reviews on this repo. Configure here.