Skip to content

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.

Update import_fixes.py

Daniel Hanee0a2424297f
diff --git a/unsloth/import_fixes.py b/unsloth/import_fixes.py
index da0fbc613b5..f0dde256c14 100644
--- a/unsloth/import_fixes.py
+++ b/unsloth/import_fixes.py
@@ -20,6 +20,7 @@ from packaging.version import Version as TrueVersion
import re
import logging
import textwrap
+import warnings
# We cannot do from unsloth_zoo.log import logger since FBGEMM might cause seg faults.
UNSLOTH_ENABLE_LOGGING = os.environ.get("UNSLOTH_ENABLE_LOGGING", "0") in (
@@ -99,6 +100,8 @@ if os.environ.get("UNSLOTH_ENABLE_LOGGING", "0") != "1":
sys.stderr.add_filter("TMA benchmarks will be running")
# Skipping import of cpp extensions due to incompatible torch version 2.9.0+cu128 for torchao version 0.15.0
logging.getLogger("torchao").setLevel(logging.ERROR)
+ # SyntaxWarning: invalid escape sequence '\.'
+ warnings.filterwarnings("ignore", message = "invalid escape sequence", category = SyntaxWarning)
# Fix up AttributeError: 'MessageFactory' object has no attribute 'GetPrototype'