unsloth/studio/backend/core
Daniel Han 30094835d5 Only retry the unsloth import where it can succeed
The gate still let the retry run on hosts unsloth does not support, which is
where it is most harmful: a 7 GB macOS runner lost the Studio server 26 s into a
load, and the Linux runner was torn down mid-generation. Neither MPS nor plain
CPU can complete the import, so the retry there pays the cost and fails anyway.

Require an accelerator unsloth actually supports (CUDA/ROCm via torch.cuda, or
XPU), with UNSLOTH_ALLOW_CPU as the documented override, and hoist the predicate
to module level so it is tested directly rather than through the import system.
On a CPU-only host the retry no longer fires at all; on CUDA the clean-environment
case it was added for still passes 29/29.
2026-07-27 07:23:29 +00:00
..
data_recipe Studio: add configurable model download location (#7274) 2026-07-23 01:34:38 -07:00
export studio: shard export checkpoint loads across all visible GPUs (#7215) 2026-07-26 04:16:36 -07:00
inference Only retry the unsloth import where it can succeed 2026-07-27 07:23:29 +00:00
rag Studio: add Deep Research (#7219) 2026-07-26 23:36:02 -07:00
training Close the load-versus-training-start race, and two picker fixes 2026-07-27 05:44:41 +00:00
__init__.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
_torchao_stub.py Reduce and tighten code comments and docstrings repo-wide (#6095) 2026-06-08 23:09:51 -07:00
import_guards.py Studio: self-heal unsloth namespace shadows; clearer failed-load messages (#6532) 2026-06-21 22:43:31 -07:00
research_runs.py Studio: add Deep Research (#7219) 2026-07-26 23:36:02 -07:00
tool_healing.py Studio: Inkling support fixes (#7153) 2026-07-15 11:22:38 -07:00