unsloth/studio
Daniel Han be4c57b052 Fix Colab training failing with "Please install unsloth_zoo"
The Colab no-venv path in setup.sh (added in #4601, modified in #4618)
only installs studio.txt (fastapi, uvicorn, structlog, etc.) into
system Python. It skips install_python_stack entirely via
_SKIP_PYTHON_DEPS=true, which means base.txt (unsloth + unsloth-zoo),
extras.txt, extras-no-deps.txt (trl, transformers, sentence_transformers),
and overrides.txt (torchao) are never installed.

When the training worker subprocess spawns and tries to import unsloth,
unsloth/__init__.py calls importlib.metadata.version("unsloth_zoo")
which raises PackageNotFoundError, surfaced as:
  "Failed to import ML libraries: Please install unsloth_zoo"

Even if unsloth_zoo were installed, the next failure would be trl
(imported at trainer.py:63) since it lives in extras-no-deps.txt.

Fix: install all four requirement groups in the Colab block, matching
what install_python_stack.py does for the normal venv path:
  - base.txt (unsloth + unsloth-zoo) -- fail-fast on error
  - extras.txt (version-stripped to avoid Colab conflicts)
  - extras-no-deps.txt (trl, transformers, sentence_transformers)
  - overrides.txt (torchao)

Only the Colab code path is changed. Non-Colab paths are untouched.
2026-03-26 14:18:49 +00:00
..
backend fix: Windows installer fails on _yaml.pyd Access Denied (os error 5) (#4617) 2026-03-26 05:15:19 -07:00
frontend studio: humanize ETA display for long training runs (#4608) 2026-03-26 06:55:54 -07:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_llama_prebuilt.py fix(studio): source-build fallback prefers Unsloth's tested tag over upstream latest (#4593) 2026-03-25 07:25:47 -07:00
install_python_stack.py Fix Colab huggingface-hub conflict, ensurepip fallback, bump to 2026.3.14 (#4603) 2026-03-25 09:38:02 -07:00
LICENSE.AGPL-3.0 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 Fix Colab Studio launch and setup.ps1 box alignment (#4601) 2026-03-25 09:00:08 -07:00
setup.sh Fix Colab training failing with "Please install unsloth_zoo" 2026-03-26 14:18:49 +00:00
Unsloth_Studio_Colab.ipynb Update Unsloth_Studio_Colab.ipynb 2026-03-26 05:45:30 -07:00