bitsandbytes interprets URLs from environment variables as paths
allo- opened this issue · comments
System Info
Ubuntu 22.04, Python 3.10
Reproduction
export TEST_VAR="http://localhost/"
python3 somescript_using_bitsandbytes.py
Results in
The following directories listed in your path were found to be non-existent: {PosixPath('//localhost'), PosixPath('http')}
is a bit too eager to interpret everything with os.sep
in it as PATH variable.
Expected behavior
bitsandbytes should only look in relevant PATH variables for paths. This also avoids the risk of finding existing paths with wrong library versions that weren't meant to be used in the current script.
Related: #1126
I agree; this could use some improvement.
As bitsandbytes prints a lot of information on how to debug not found libraries, I wonder if it needs such a broad search for possible paths in the environment or could just check a list of known path variables and otherwise print help on how to set variables like CUDA_HOME
as a clean way to provide the library paths.