Repository navigation
Require bitsandbytes>=0.50.0 and drop the _check_is_size warning filter - #6893
behroozazarkhalili wants to merge 9 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
…ytes-drop-check-is-size-filter
|
@albertvillanova, a re-read of #6447 shows I misapplied its closing condition. The issue says:
This PR bumps the floor for exactly that reason and no other. I looked for an independent one and did not find it: TRL has no bitsandbytes version gate anywhere ( Two options, your call:
I have refreshed the verification numbers in the description to match the merge-forwarded head (the filter list is now 15 entries before and 14 after, and 235 tests collect in |
|
Thanks for catching this yourself and laying out the options. Going with your option 1. Two reasons, both now settled:
So the filter stays and the floor doesn't move yet. That bitsandbytes has no floor at all is a separate gap noted in #7116; declaring a first floor drops support for nothing, so it doesn't need this PR. Your verification approach is worth reusing when the trigger does fire. |
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.2 (released 2026-08-27), so the filter is dead in practice. Recording the minimum turns that into a guarantee. Note that #6447 asks not to bump the floor solely for this reason; see the discussion below the description.
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 (235 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 needs triton >= 3.8.0, which reached PyPI on 2026-08-28; it is a separate change and stays out of scope here.
Note
Low Risk
Dependency floor bump and test-config cleanup only; no runtime or training logic changes.
Overview
Requires bitsandbytes 0.50.0+ for installs using the
quantizationordevextras, replacing an unpinnedbitsandbytesdependency.Removes the pytest
filterwarningsentry (and its comments) that ignored bitsandbytes’torch._check_is_sizeFutureWarning. That warning is gone upstream as of bitsandbytes 0.50.0, so the filter is no longer needed. The separate bitsandbytes “inner dimension not aligned” warning filter is unchanged.Reviewed by Cursor Bugbot for commit 25005bf. Bugbot is set up for automated code reviews on this repo. Configure here.