Skip to content

Remove bitsandbytes _check_is_size warning filter - #6590

Closed
yashb98 wants to merge 1 commit into
huggingface:mainfrom
yashb98:feat/remove-bnb-check-is-size-filter
Closed

yashb98 wants to merge 1 commit into
huggingface:mainfrom
yashb98:feat/remove-bnb-check-is-size-filter

Conversation

@yashb98

@yashb98 yashb98 commented Jul 30, 2026 •

Copy link
Copy Markdown

What does this PR do?

Removes the _check_is_size filterwarnings entry from pyproject.toml, which is the action item in #6447.

Fixes #6447

The entry was added because bitsandbytes called the deprecated torch._check_is_size in its CUDA quant ops. The upstream fix (bitsandbytes-foundation/bitsandbytes#1940) was merged but unreleased at the time, so the issue asked to remove the filter once a release containing it reached CI. bitsandbytes 0.50.0 is that release, and CI is already on it (#6546).

Verification

Ran the three tests named in the issue with the filter removed, on an aarch64 GB10, torch 2.13.0+cu130, capturing all warnings:

bitsandbytes result _check_is_size warnings
0.50.0 3 passed 0
0.49.2 3 passed 14, from bitsandbytes/backends/cuda/ops.py:213

So the filter is genuinely dead on 0.50.0, and the 0.49.2 row confirms the check is meaningful rather than vacuous: it does still catch the warning on the older release. Independently, _check_is_size appears 0 times anywhere in the installed 0.50.0 package and 6 times in 0.49.2.

Worth noting that filterwarnings does not start with error, so this cannot fail CI on an older bitsandbytes either. It would only restore log noise.

Before submitting

AI writing disclosure

  • No AI usage: the PR was written entirely by a human.
  • AI-assisted: some parts were suggested or improved by AI, but the PR was written and reviewed by a human.
  • AI-generated: the PR was mostly or fully generated by an AI tool.

Who can review?

Anyone once CI is green.


Note

Low Risk
Test-configuration-only change with no runtime or dependency logic; worst case on an older bitsandbytes is extra warning noise in logs, not CI failure.

Overview
Removes the pytest filterwarnings ignore for bitsandbytes’ deprecated torch._check_is_size FutureWarning from pyproject.toml, closing the follow-up in #6447.

That entry was only needed while CI still pulled bitsandbytes before the upstream fix shipped; with bitsandbytes 0.50.0 on CI, PEFT + quantization tests no longer emit that warning, so the filter is dead weight.

Reviewed by Cursor Bugbot for commit f232d09. Bugbot is set up for automated code reviews on this repo. Configure here.

@albertvillanova

Copy link
Copy Markdown
Member

Thanks for your contribution, @yashb98.

Unfortunately, I'm going to close this, and the reason is a wording bug in my issue #6447, not a problem with the PR.

#6447 says to remove the filter "once bitsandbytes ships the fix". That criterion is wrong, and this PR implements it faithfully. The correct criterion is: remove the filter once TRL's minimum required bitsandbytes version is >= the first release containing the fix (0.50.0).

pyproject.toml declares bitsandbytes with no lower bound, so every resolvable release is still a supported configuration, and filterwarnings is part of the declared test configuration for all of them, not a snapshot of what today's resolver installs in CI.

I am going to reword #6447 so the action item is unambiguous, and keep it open until the floor moves.

Apologies for the wasted round trip: the fault is in the issue, not in your work.

@yashb98

yashb98 commented Jul 31, 2026

Copy link
Copy Markdown
Author

No worries, and thanks for the explanation. The declared-config vs CI snapshot point makes sense. I read "ships the fix" as the trigger and didn't account for the missing lower bound. I'll watch #6447 and resubmit the same diff once the minimum required bitsandbytes moves to >= 0.50.0.

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

2 participants