From 353750f33854890fb289069680f637459948a8a2 Mon Sep 17 00:00:00 2001 From: Strahinja Stamenkovic Date: Thu, 25 Dec 2025 16:33:28 +0100 Subject: [PATCH 1/2] Add missing import of inspect --- unsloth/device_type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/device_type.py b/unsloth/device_type.py index 68038de679..ff62200f0c 100644 --- a/unsloth/device_type.py +++ b/unsloth/device_type.py @@ -24,9 +24,9 @@ import torch import functools +import inspect from unsloth_zoo.utils import Version - @functools.cache def is_hip(): return bool(getattr(getattr(torch, "version", None), "hip", None)) From 579f102475af1275fec69aa2e5addd091bd62a6a Mon Sep 17 00:00:00 2001 From: Strahinja Stamenkovic Date: Thu, 25 Dec 2025 16:36:37 +0100 Subject: [PATCH 2/2] Update device_type.py --- unsloth/device_type.py | 1 + 1 file changed, 1 insertion(+) diff --git a/unsloth/device_type.py b/unsloth/device_type.py index ff62200f0c..0f924bfdfd 100644 --- a/unsloth/device_type.py +++ b/unsloth/device_type.py @@ -27,6 +27,7 @@ import inspect from unsloth_zoo.utils import Version + @functools.cache def is_hip(): return bool(getattr(getattr(torch, "version", None), "hip", None))