From 34d3b9f6e152af4eb0def4a57189fad583ecb375 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 1 Jul 2025 00:14:58 -0700 Subject: [PATCH] Update setup.py --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 703604c54a..fc4c113166 100644 --- a/setup.py +++ b/setup.py @@ -25,7 +25,6 @@ from setuptools.command.install import install ROOT_DIR = Path(__file__).parent UNSLOTH_TARGET_DEVICE = os.environ.get("UNSLOTH_TARGET_DEVICE", "cuda") IS_COLAB = "COLAB_" not in "".join(os.environ.keys()) -UNSLOTH_VERSION = load_module_from_path('ver', os.path.join(ROOT_DIR, 'unsloth', 'version.py')) # Try importing torch HAS_TORCH = False @@ -55,6 +54,7 @@ def load_module_from_path(module_name, path): spec.loader.exec_module(module) return module pass +ver = load_module_from_path('ver', os.path.join(ROOT_DIR, 'unsloth', 'version.py')) def get_nvcc_cuda_version(): @@ -103,7 +103,7 @@ pass def get_unsloth_version(): - version = UNSLOTH_VERSION.__version__ + version = ver.__version__ if version is None: raise RuntimeError("unsloth version not found")