fix(mlx): relax context-store timeout by default (#7141)
This commit is contained in:
parent
49f2879cf8
commit
57785f92d2
2 changed files with 10 additions and 0 deletions
|
|
@ -49,6 +49,11 @@ logger = get_logger(__name__)
|
|||
# and spawn workers copy os.environ. setdefault so an explicit user override wins.
|
||||
os.environ.setdefault("CUDA_DEVICE_ORDER", "PCI_BUS_ID")
|
||||
|
||||
# Studio workers can import MLX without importing unsloth first, so mirror the
|
||||
# package bootstrap here. Keep an explicit user value authoritative.
|
||||
if platform.system() == "Darwin" and platform.machine() == "arm64":
|
||||
os.environ.setdefault("AGX_RELAX_CDM_CTXSTORE_TIMEOUT", "1")
|
||||
|
||||
|
||||
# ========== Device Enum ==========
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@ import os, importlib.util, platform
|
|||
|
||||
os.environ["UNSLOTH_IS_PRESENT"] = "1"
|
||||
|
||||
# Relax Metal's context-store timeout before MLX modules can initialize Metal.
|
||||
# Keep an explicit user value authoritative.
|
||||
if platform.system() == "Darwin" and platform.machine() == "arm64":
|
||||
os.environ.setdefault("AGX_RELAX_CDM_CTXSTORE_TIMEOUT", "1")
|
||||
|
||||
# ── Windows console UTF-8 safety ─────────────────────────────────────────────
|
||||
# Legacy Windows consoles (cp1252) can't encode Unsloth's emoji/box-drawing
|
||||
# glyphs and crash with UnicodeEncodeError. Force stdout/stderr to UTF-8 only on
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue