[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
c290cac455
commit
4018a697d2
1 changed files with 3 additions and 1 deletions
|
|
@ -1173,7 +1173,9 @@ def _ensure_cpu_torch() -> None:
|
|||
return
|
||||
if probe.returncode != 0:
|
||||
return
|
||||
_lines = [line.strip() for line in probe.stdout.decode(errors = "replace").splitlines() if line.strip()]
|
||||
_lines = [
|
||||
line.strip() for line in probe.stdout.decode(errors = "replace").splitlines() if line.strip()
|
||||
]
|
||||
if not _lines or _lines[-1] != "gpu":
|
||||
return # already CPU (or unreadable) -- nothing to repair
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue