Skip to content

Replace print/warnings with logging in library modules#1883

Merged
matthewdouglas merged 2 commits intobitsandbytes-foundation:mainfrom
Abdennacer-Badaoui:logging
Mar 2, 2026
Merged

Replace print/warnings with logging in library modules#1883
matthewdouglas merged 2 commits intobitsandbytes-foundation:mainfrom
Abdennacer-Badaoui:logging

Conversation

@Abdennacer-Badaoui
Copy link
Member

Replace print() and misused warnings.warn() calls with logging.getLogger(__name__) in utils.py, nn/modules.py, and autograd/_functions.py. This lets downstream users control bitsandbytes log output via standard Python logging configuration.

Fixes #919

@Abdennacer-Badaoui Abdennacer-Badaoui added Enhancement New feature or request Low Risk Risk of bugs in transformers and other libraries labels Feb 27, 2026
@github-actions
Copy link

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.

@matthewdouglas matthewdouglas merged commit d77e01c into bitsandbytes-foundation:main Mar 2, 2026
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Low Risk Risk of bugs in transformers and other libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Noisy logs

2 participants