[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2026-06-27 09:12:02 +00:00
commit 4018a697d2

View file

@ -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