Skip to content

Require bitsandbytes>=0.50.0 and drop the _check_is_size warning filter - #6893

Open
behroozazarkhalili wants to merge 2 commits into
mainfrom
fix/6447-pin-bitsandbytes-drop-check-is-size-filter
Open

Require bitsandbytes>=0.50.0 and drop the _check_is_size warning filter#6893
behroozazarkhalili wants to merge 2 commits into
mainfrom
fix/6447-pin-bitsandbytes-drop-check-is-size-filter

Conversation

@behroozazarkhalili

@behroozazarkhalili behroozazarkhalili commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Resolves #6447.

What

Raises the bitsandbytes floor to >=0.50.0 in the quantization and dev extras, and removes the pytest filter that silenced its _check_is_size FutureWarning.

Why the trigger has fired

bitsandbytes replaced every torch._check_is_size call with torch._check in 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:

tag _check_is_size in bitsandbytes/_ops.py
0.49.2 8
0.50.0 0
0.50.1 0

The 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 filterwarnings list programmatically and then calling torch._check_is_size(1):

pyproject filter entries warning surfaced
before 14 no
after 13 yes

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-only still loads the config (231 tests collected in tests/test_utils.py).

Scanning the installed environment, only bitsandbytes and torch itself call _check_is_size. torch's remaining callers are in fx/passes/runtime_assert.py, fx/experimental/symbolic_shapes.py, _dynamo/trace_rules.py, and export/_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 bitsandbytes to >=0.50.0 in the quantization and dev extras so the library no longer uses deprecated torch._check_is_size.

Removes the matching pytest filterwarnings entry for that FutureWarning, 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.

… 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
@bot-ci-comment

Copy link
Copy Markdown

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.

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.

Remove bitsandbytes _check_is_size warning filter once the minimum required bitsandbytes is >= 0.50.0

1 participant