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 <danielhanchen@users.noreply.github.com> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
04fb97aee2
commit
529436a007
1 changed files with 8 additions and 1 deletions
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue