diff options
author | Max Ryabinin <mryabinin0@gmail.com> | 2022-08-24 18:45:17 +0300 |
---|---|---|
committer | Max Ryabinin <mryabinin0@gmail.com> | 2022-08-24 18:45:17 +0300 |
commit | 92a3363096e10ad6a5c4e944af898bd1186d806a (patch) | |
tree | 4d21c6cb5cef45e992cf2cc36caf89af3c81632e /bitsandbytes/__main__.py | |
parent | 9fc0ab415c564d278b673c694de9b884ea1121d2 (diff) |
Replace print_stderr with warnings.warn
Diffstat (limited to 'bitsandbytes/__main__.py')
-rw-r--r-- | bitsandbytes/__main__.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bitsandbytes/__main__.py b/bitsandbytes/__main__.py index 5f11875..175a30e 100644 --- a/bitsandbytes/__main__.py +++ b/bitsandbytes/__main__.py @@ -3,8 +3,9 @@ # cli() import os import sys -import torch +from warnings import warn +import torch HEADER_WIDTH = 60 @@ -32,8 +33,6 @@ print() from . import COMPILED_WITH_CUDA, PACKAGE_GITHUB_URL from .cuda_setup.main import get_compute_capabilities, get_cuda_lib_handle from .cuda_setup.env_vars import to_be_ignored -from .utils import print_stderr - print_header("POTENTIALLY LIBRARY-PATH-LIKE ENV VARS") for k, v in os.environ.items(): @@ -84,7 +83,7 @@ try: except ImportError: print() - print_stderr( + warn( f"WARNING: {__package__} is currently running as CPU-only!\n" "Therefore, 8-bit optimizers and GPU quantization are unavailable.\n\n" f"If you think that this is so erroneously,\nplease report an issue!" |