Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid escape sequence warning in Python 3.12 #1420

Merged
merged 2 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bitsandbytes/cextension.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_cuda_bnb_library_path(cuda_specs: CUDASpecs) -> Path:

override_value = os.environ.get("BNB_CUDA_VERSION")
if override_value:
library_name = re.sub("cuda\d+", f"cuda{override_value}", library_name, count=1)
library_name = re.sub(r"cuda\d+", f"cuda{override_value}", library_name, count=1)
logger.warning(
f"WARNING: BNB_CUDA_VERSION={override_value} environment variable detected; loading {library_name}.\n"
"This can be used to load a bitsandbytes version that is different from the PyTorch CUDA version.\n"
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ line-length = 119
[tool.ruff.lint]
select = [
"B", # bugbear: security warnings
"E", # pycodestyle
"E", # pycodestyle (error)
"W", # pycodestyle (warning)
"F", # pyflakes
"I", # isort
"ISC", # implicit string concatenation
Expand Down
Loading