unsloth/studio
Daniel Han 735fcde44c
pip: declare the Studio dependencies the wheel's own modules import (#7493)
* pip: declare the Studio dependencies the wheel's own modules import

The wheel packages studio/ and studio.backend*, so pip install unsloth puts
five commands on PATH -- train, export, chat, inference, studio -- and every one
of them imports studio.backend.*. None of those imports were declared, so all
five ended in a rich traceback at ModuleNotFoundError: No module named
'structlog' (#4701, #5260, #7147). --help rendered fine for all of them because
typer defers the import, which is why this went unnoticed.

Walking module-level, non-try-guarded imports from each entry point shows
structlog is the only hard requirement they share, once starlette's
annotation-only import in loggers/handlers.py moves under TYPE_CHECKING. So
structlog becomes a core dependency and the rest of the server stack (fastapi,
uvicorn, matplotlib, pandas, pymupdf, ...) becomes a [studio] extra mirroring
studio/backend/requirements/studio.txt, with a test that fails if the two drift.

pip install unsloth           -> train / export work
pip install "unsloth[studio]" -> the server works

* Apply ruff-format quote normalisation

* Trim the comments added in this PR
2026-07-27 03:44:07 -07:00
..
backend pip: declare the Studio dependencies the wheel's own modules import (#7493) 2026-07-27 03:44:07 -07:00
frontend Studio: add Deep Research (#7219) 2026-07-26 23:36:02 -07:00
src-tauri Unsloth Studio (desktop): fix canvas preview, download file button, toast placement, and model-load typing lag (#7391) 2026-07-24 22:23:41 -05:00
__init__.py Final cleanup 2026-03-12 18:28:04 +00:00
install_llama_prebuilt.py Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
install_node_prebuilt.py Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
install_python_stack.py Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
install_whisper_prebuilt.py Studio whisper: pair slim bundles on the ggml commit, not the full llama tag (#7381) 2026-07-23 20:18:36 -07:00
LICENSE.AGPL-3.0 Add AGPL-3.0 license to studio folder 2026-03-09 19:36:25 +00:00
MCP.md Replace standalone Studio wording with Unsloth (#7221) 2026-07-19 00:47:04 -07:00
node_prebuilt_pins.json Pin isolated Node.js installer to committed sha256 digests (#6625) 2026-06-24 05:47:58 -07:00
package-lock.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
package.json ci: advisory lockfile supply-chain audit (no install-script changes) (#5604) 2026-05-19 05:56:56 -07:00
prebuilt_core.py Let a decode failure degrade instead of escaping a fail-closed helper (#7487) 2026-07-27 03:26:08 -07:00
setup.bat Final cleanup 2026-03-12 18:28:04 +00:00
setup.ps1 Studio: fail fast on out-of-disk instead of a doomed llama.cpp source build (#7420) 2026-07-26 00:11:38 -07:00
setup.sh install.sh, setup.sh: apply the no-tty consent fix to the remaining sites (#7470) 2026-07-26 05:22:28 -07:00
Unsloth_Studio_Colab.ipynb fix(studio/colab): restore blank Colab iframe embed (#7344) (#7349) 2026-07-24 02:23:24 -07:00