From 084ca10ac2475a8ad49a93acb7a7f2e83d5bb496 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sat, 14 Feb 2026 22:14:05 -0800 Subject: [PATCH] Silence Apex Aiter RoPE warning unless logging is enabled (#4058) * Silence Apex Aiter RoPE warning unless logging is enabled * Update unsloth/import_fixes.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --------- Co-authored-by: Daniel Hanchen Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- unsloth/import_fixes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/unsloth/import_fixes.py b/unsloth/import_fixes.py index f11328f7e9..6d3df0b470 100644 --- a/unsloth/import_fixes.py +++ b/unsloth/import_fixes.py @@ -97,7 +97,7 @@ class HidePrintMessage: return getattr(self._original_stream, name) -if os.environ.get("UNSLOTH_ENABLE_LOGGING", "0") != "1": +if not UNSLOTH_ENABLE_LOGGING: import sys # Apply to stderr for FBGEMM and CUTLASS errors @@ -204,6 +204,13 @@ if os.environ.get("UNSLOTH_ENABLE_LOGGING", "0") != "1": sys.stderr.add_filter("df: No such file") # ROCm/libdrm missing ids table stderr noise on some AMD setups sys.stderr.add_filter(_AMDGPU_IDS_MISSING_TEXT) + # Apex ROCm fused RoPE backend selection warning when Aiter is enabled. + warnings.filterwarnings( + "ignore", + message = r"^Aiter backend is selected for fused RoPE\.?", + category = UserWarning, + module = r"^apex\.transformer\.functional\.fused_rope$", + ) # Fix up AttributeError: 'MessageFactory' object has no attribute 'GetPrototype'