From b9c6882df49dc09c03a7c18376eab3b5c9fab3f9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 7 May 2026 00:27:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- studio/install_python_stack.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/studio/install_python_stack.py b/studio/install_python_stack.py index 0a9175abef..d580a163e4 100644 --- a/studio/install_python_stack.py +++ b/studio/install_python_stack.py @@ -1178,10 +1178,18 @@ def install_python_stack() -> int: # Only warn if torch doesn't already have ROCm (HIP) support try: _hip_ver = subprocess.run( - [sys.executable, "-c", "import torch; print(getattr(torch.version,'hip','') or '')"], - stdout = subprocess.PIPE, stderr = subprocess.DEVNULL, timeout = 20, + [ + sys.executable, + "-c", + "import torch; print(getattr(torch.version,'hip','') or '')", + ], + stdout = subprocess.PIPE, + stderr = subprocess.DEVNULL, + timeout = 20, + ) + _has_rocm_torch = ( + _hip_ver.returncode == 0 and _hip_ver.stdout.decode().strip() != "" ) - _has_rocm_torch = _hip_ver.returncode == 0 and _hip_ver.stdout.decode().strip() != "" except Exception: _has_rocm_torch = False if not _has_rocm_torch: