Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions studio/backend/core/training/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -2579,6 +2579,15 @@ def _probe() -> None:
_bnb_rocm_ver,
)

# Setting BNB_ROCM_VERSION makes bitsandbytes log a benign override
# notice on import; drop only that record so real errors and mismatch
# warnings still show.
if os.environ.get("BNB_ROCM_VERSION"):
import logging as _logging
_logging.getLogger("bitsandbytes.cextension").addFilter(
lambda _r: "environment variable detected" not in _r.getMessage()
)

# Parse HIP version for the kernel-fix gate below, falling back to
# the rocm version embedded in torch.__version__ when version.hip is
# unset (AMD SDK / Radeon wheels).
Expand Down
8 changes: 8 additions & 0 deletions studio/backend/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ def _ver_key(name: str) -> tuple:
_bnb_rocm_ver_final,
)

# Setting BNB_ROCM_VERSION makes bitsandbytes log a benign override notice on
# import; drop only that record so real errors and mismatch warnings show.
if os.environ.get("BNB_ROCM_VERSION"):
import logging as _logging
_logging.getLogger("bitsandbytes.cextension").addFilter(
lambda _r: "environment variable detected" not in _r.getMessage()
)

# ── WSL AMD Strix Halo (gfx1151): enable ROCDXG before any torch import ──────
# In WSL the AMD GPU is reached via the ROCDXG bridge (librocdxg.so over
# /dev/dxg), which HSA loads only when HSA_ENABLE_DXG_DETECTION=1 is set BEFORE
Expand Down
11 changes: 11 additions & 0 deletions studio/backend/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,15 @@ def run_server(
from threading import Thread, Event
import uvicorn

# `from main import app` below loads torch/unsloth/transformers (~2 min cold,
# silent), so print a flushed heads-up (piped stdout is block-buffered).
if not silent:
print(
"Loading Unsloth Studio, please wait... (this can take a few minutes)",
flush = True,
)
print(" - loading PyTorch, Unsloth and Transformers...", flush = True)

import_started = time.perf_counter()

from main import app, setup_frontend, _IS_COLAB
Expand All @@ -1164,6 +1173,8 @@ def run_server(
"Imported FastAPI app in %.1fms",
(time.perf_counter() - import_started) * 1000,
)
if not silent:
print(" - Starting server...", flush = True)
from utils.paths import ensure_studio_directories

# Allow local stdio MCP servers on a loopback bind (the user's own machine),
Expand Down
Loading