Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Fix version parsing NameError and older Python syntax compatibility (#6318)
UmranPros5b0986fe3036
diff --git a/unsloth/import_fixes.py b/unsloth/import_fixes.pyindex a100e11f0ca..eb43666d56f 100644--- a/unsloth/import_fixes.py+++ b/unsloth/import_fixes.py@@ -49,7 +49,7 @@ def Version(version):new_version = str(version)new_version = re.match(r"[0-9\.]{1,}", new_version)if new_version is None:- raise Exception(str(e))+ raise ValueError(f"Could not parse version: {version}")new_version = new_version.group(0).rstrip(".")if new_version != version:new_version += ".1" # Add .1 for dev / alpha / beta / rcdiff --git a/unsloth/kernels/moe/tests/common.py b/unsloth/kernels/moe/tests/common.pyindex 9d19fd4a18e..f35a2fc9c34 100644--- a/unsloth/kernels/moe/tests/common.py+++ b/unsloth/kernels/moe/tests/common.py@@ -158,8 +158,8 @@ def assert_close()bad_idxs = bad_idxs.unbind(-1)- print("ref values: ", ref[*bad_idxs].cpu())- print("tri values: ", tri[*bad_idxs].cpu())+ print("ref values: ", ref[bad_idxs].cpu())+ print("tri values: ", tri[bad_idxs].cpu())assert max_err <= maxtolassert rms_err <= rmstol