fix: replace [huggingfacenotorch] with no-torch-runtime.txt requirements (#4649)

The [huggingfacenotorch] extras only exist in pyproject.toml but are
NOT published on PyPI, so uv pip install "unsloth[huggingfacenotorch]"
fails on fresh installs from the registry.

Fix: add studio/backend/requirements/no-torch-runtime.txt with the
runtime deps (safetensors, transformers, datasets, accelerate, etc.)
that mirror [huggingfacenotorch] from pyproject.toml. In no-torch mode:
1. install.sh/ps1 install unsloth + unsloth-zoo with --no-deps
2. SKIP_STUDIO_BASE=0 so install_python_stack.py's NO_TORCH branch runs
3. install_python_stack.py installs no-torch-runtime.txt
This commit is contained in:
Daniel Han 2026-03-27 03:58:51 -07:00 committed by GitHub
parent 9d68621614
commit b1c3a1e857
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 55 additions and 38 deletions

View file

@ -462,24 +462,14 @@ def install_python_stack() -> int:
if skip_base:
print(_green(f"{package_name} already installed — skipping base packages"))
elif NO_TORCH:
# No-torch mode: install runtime deps via [huggingfacenotorch] extras
# (safetensors, transformers, datasets, etc.), then unsloth-zoo with
# --no-deps to avoid pulling torch.
# No-torch mode: unsloth + unsloth-zoo are already installed with
# --no-deps by install.sh/install.ps1. Install the runtime deps
# (safetensors, transformers, datasets, etc.) from no-torch-runtime.txt.
_progress("base packages (no torch)")
pip_install(
"Installing unsloth runtime deps (no-torch mode)",
"Installing no-torch runtime deps",
"--no-cache-dir",
"--upgrade-package",
"unsloth",
"unsloth[huggingfacenotorch]>=2026.3.14",
)
pip_install(
"Installing unsloth-zoo (no-torch mode)",
"--no-cache-dir",
"--no-deps",
"--upgrade-package",
"unsloth-zoo",
"unsloth-zoo",
req = REQ_ROOT / "no-torch-runtime.txt",
)
if local_repo:
pip_install(