unsloth/studio/backend
Daniel Han 55c392ff7c
studio: fix sentence-transformers RAG embedder on Windows ROCm (torchao) (#6608)
torchao has no working Windows ROCm build. transformers.quantizers imports it,
and it loads torch's c10d distributed backend at module level, which the AMD
Windows wheels omit (no RCCL). The import aborts, transformers can no longer
expose PreTrainedModel, and the sentence-transformers embedder silently falls
back to the llama-server GGUF embedder. Linux ROCm and NVIDIA are unaffected
(the c10d ops are present / torchao is real there).

The training and export workers already install the shared torchao stub before
importing transformers, but the RAG embedder runs in the main backend process,
which never did. Two fixes, both no-ops off Windows ROCm:

- embeddings.py: install_torchao_windows_rocm_stub() before the first
  sentence-transformers import, so an already-installed torchao is neutralized
  (fixes existing venvs).
- install_python_stack.py: stop installing torchao on Windows ROCm; it can only
  crash on import there, so new venvs never ship it.

Add tests covering the embedder stub call and the install skip.
2026-06-23 05:39:02 -07:00
..
assets Harden trust_remote_code consent: scan GGUF-only auto_map and drop pre-set TRC defaults (#6478) 2026-06-22 02:10:35 -07:00
auth CLI: stop unsloth connect from leaking Studio credentials to unverified servers (#6479) 2026-06-21 21:28:38 -07:00
core studio: fix sentence-transformers RAG embedder on Windows ROCm (torchao) (#6608) 2026-06-23 05:39:02 -07:00
hub Studio: add an Open button to reveal the models folder in the file manager (#6452) 2026-06-19 05:14:58 -07:00
loggers Studio: trim serving-log noise and surface llama-server engine stats (#6377) 2026-06-17 05:37:57 -07:00
models Add Hugging Face dataset streaming mode to Studio (#4946) 2026-06-22 17:48:18 +03:00
plugins Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
requirements Studio: correct the anyio<4.14 pin rationale (mixed-install ImportError, not a 4.14 cancel-scope bug) (#6579) 2026-06-22 09:05:22 -07:00
routes Add Hugging Face dataset streaming mode to Studio (#4946) 2026-06-22 17:48:18 +03:00
state Studio: Add inline confirmation (Allow/Always allow/Deny) for tool calls (#5869) 2026-06-12 10:55:26 +02:00
storage feat: implement thread forking functionality with associated database… (#5810) 2026-06-15 14:57:39 +01:00
tests studio: fix sentence-transformers RAG embedder on Windows ROCm (torchao) (#6608) 2026-06-23 05:39:02 -07:00
utils Fix Studio export checkpoint ordering (#6602) 2026-06-23 12:25:53 +01:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
_platform_compat.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
cloudflare_tunnel.py Reap Studio child processes when the parent dies abnormally (#6425) 2026-06-18 05:51:22 -07:00
colab.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
main.py Studio macOS: faster startup, MLX self-heal, drop obsolete prebuilt pins (#6494) 2026-06-22 02:20:08 -07:00
run.py Studio: fix Ctrl+C shutdown ordering (installer shell + uvicorn thread wait) (#6566) 2026-06-22 07:41:10 -07:00
startup_banner.py Studio: enable stdio MCP servers on a loopback bind (#6295) 2026-06-15 03:02:32 +01:00