[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
58c640dfe5
commit
35f3465d86
1 changed files with 2 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ def _fix_torch_cuda_ld_path():
|
|||
return False
|
||||
try:
|
||||
import importlib.util
|
||||
|
||||
spec = importlib.util.find_spec("torch")
|
||||
if not spec or not spec.origin:
|
||||
return False
|
||||
|
|
@ -54,7 +55,7 @@ def _fix_torch_cuda_ld_path():
|
|||
|
||||
# Already at the front -- nothing to do
|
||||
existing = ld_path.split(":")
|
||||
if existing[:len(lib_dirs)] == lib_dirs:
|
||||
if existing[: len(lib_dirs)] == lib_dirs:
|
||||
return False
|
||||
|
||||
# Prepend torch dirs, deduplicate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue