Skip to content

Ignore benign bitsandbytes _check_is_size FutureWarning in CI - #6448

Merged
albertvillanova merged 1 commit into
mainfrom
fix-bitsandbytes-check-is-size-warning
Jul 20, 2026
Merged

Ignore benign bitsandbytes _check_is_size FutureWarning in CI#6448
albertvillanova merged 1 commit into
mainfrom
fix-bitsandbytes-check-is-size-warning

Conversation

@albertvillanova

@albertvillanova albertvillanova commented Jul 19, 2026

Copy link
Copy Markdown
Member

This PR silences a benign FutureWarning emitted in CI by the PEFT + quantization tests when a bitsandbytes-quantized model is loaded.

Motivation

test_peft_with_quantization in the DPO, KTO, and SFT trainer tests triggers a FutureWarning from bitsandbytes:

bitsandbytes/backends/cuda/ops.py:213: FutureWarning: _check_is_size will be removed in a future PyTorch release along with guard_size_oblivious. Use _check(i >= 0) instead.
  torch._check_is_size(blocksize)

The warning comes from bitsandbytes, which calls the deprecated torch._check_is_size in its CUDA quantization ops. TRL only triggers it indirectly by loading a quantized model; there is nothing actionable on the TRL side. The warning clutters CI.

Solution

The issue is already fixed upstream in bitsandbytes (bitsandbytes-foundation/bitsandbytes#1940), but that fix is unreleased (latest is 0.49.2, which predates it; it is only in the continuous-release_main build). Following the existing precedent in pyproject.toml (and the same approach as #6436), this filters the non-actionable upstream warning until a bitsandbytes release including the fix is available. Removal is tracked in #6447.

Changes

  • Add a filterwarnings entry in pyproject.toml to ignore the _check_is_size FutureWarning from bitsandbytes

Note

Low Risk
Test/CI configuration only; no runtime or training behavior changes.

Overview
Adds a pytest filterwarnings ignore in pyproject.toml for the bitsandbytes FutureWarning about deprecated torch._check_is_size, which shows up when PEFT + quantization tests load 4-bit models.

This matches the existing pattern for other upstream noise (Liger, PyTorch JIT, etc.): documented with tracking issue #6447 and the upstream bitsandbytes fix PR, until a release includes the fix.

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

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

@albertvillanova
albertvillanova merged commit 0577894 into main Jul 20, 2026
14 checks passed
@albertvillanova
albertvillanova deleted the fix-bitsandbytes-check-is-size-warning branch July 20, 2026 08:59
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.

2 participants