Commit graph

16 commits

Author SHA1 Message Date
Daniel Han
0c8d407793
Rename cli/ to unsloth_cli/ to fix namespace collision with stringzilla (#4393)
* Rename cli/ to unsloth_cli/ to fix namespace collision with stringzilla

stringzilla installs a namespace package at cli/ (cli/split.py, cli/wc.py)
in site-packages without an __init__.py. When unsloth is installed as an
editable package (pip install -e .), the entry point script does
`from cli import app` which finds stringzilla's namespace cli/ first and
fails with `ImportError: cannot import name 'app' from 'cli'`.

Non-editable installs happened to work because unsloth's cli/__init__.py
overwrites the namespace directory, but this is fragile and breaks if
stringzilla is installed after unsloth.

Renaming to unsloth_cli/ avoids the collision entirely and fixes both
editable and non-editable install paths.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update stale cli/ references in comments and license files

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-17 20:40:21 -07:00
Daniel Han
c00a993a68
studio: fix stale GGUF metadata, update helper model, auth improvements (#4346)
* studio: switch helper model to Qwen3.5-4B-GGUF

Replace Qwen3-4B-Instruct-2507-GGUF with Qwen3.5-4B-GGUF as the
default helper model for LLM-assisted dataset detection. Same
UD-Q4_K_XL variant.

* studio: fix stale GGUF metadata when switching models (#4347)

Reset _supports_reasoning, _supports_tools, _context_length, and
_chat_template at the start of _read_gguf_metadata() to prevent
stale settings from a previous model leaking into the next load.

Co-authored-by: Daniel Han <daniel@unsloth.ai>

* studio: change login error to "Incorrect password", add reset-password CLI

- Login error now says "Incorrect password" instead of the generic
  "Incorrect username or password" since Studio only has one account.
- Add `unsloth studio reset-password` command that deletes the auth
  database so a fresh admin account with a new random password is
  created on the next server start.

* studio: include reset command in login error message

* studio: change password setup subtitle wording
2026-03-17 01:22:08 -07:00
Roland Tannous
08b5879101
fix: Ctrl+C not terminating backend on Linux (#4316)
* fix: Ctrl+C not breaking out of backend on Linux

threading.Event.wait() without a timeout blocks at the C level on
Linux, preventing Python from delivering SIGINT.  Use a 1-second
timeout loop so the interpreter can process pending signals.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-16 11:58:09 +04:00
Roland Tannous
0818f78617
Graceful shutdown on Windows (signal handlers for Ctrl+C) (#4306)
* fix: graceful shutdown on Windows (signal handlers for Ctrl+C)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-16 03:01:15 +04:00
Roland Tannous
f44857b2df
PR: Windows Setup Improvements (#4299)
* quiet llama.cpp build, smarter CUDA install via winget, accept Python 3.11-3.13

* studio: hide Python traceback when setup script exits with error

* setup.ps1: auto-add Python Scripts dir to PATH so 'unsloth' command works in new terminals

* setup.ps1: fix GPU check to run nvidia-smi instead of just checking command existence

* setup.ps1: fix PATH check to use exact entry comparison instead of substring match

* setup.ps1: validate Python probe exit code before persisting Scripts PATH
2026-03-14 23:59:49 +04:00
pre-commit-ci[bot]
6baa181890 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2026-03-13 13:38:19 -07:00
Roland Tannous
bf54225f86 fix: site-packages + dist check for frontend
build, fix ruff blank lines
2026-03-13 20:13:34 +00:00
Roland Tannous
8ce2b64df7 allow install from source 2026-03-13 20:04:15 +00:00
Daniel Han
96ff5c5f61
Update CODEOWNERS for studio and cli (#4266)
* Update CODEOWNERS for studio and cli

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-03-12 15:16:38 -07:00
Roland Tannous
47654cb91c Final cleanup 2026-03-12 18:28:04 +00:00
Roland Tannous
a2baf80511 Update license headers 2026-03-12 17:23:10 +00:00
Roland Tannous
6f77c63229 refactor: remove project_root passing, use self-resolved paths and ~/.unsloth/studio
- Workers now compute backend_path and venv_t5 locally via Path(__file__)
- Moved .venv_t5 to ~/.unsloth/studio/.venv_t5
- Added ensure_studio_directories() call on server startup
- Expanded CLI studio command into sub-app with setup subcommand
2026-03-11 20:32:18 +00:00
Roland Tannous
d882678fe4 Add AGPL-3.0 SPDX headers to all source files 2026-03-09 20:17:45 +00:00
Roland Tannous
d486a2ef6f rename cli studio command to use new FastAPI backend and add unsloth-ui alias for backwards compatibility 2026-02-19 17:59:22 +00:00
Roland Tannous
02982ceeba set create public gradio share link to true 2026-01-20 07:36:57 +00:00
Roland Tannous
32e72a12ae add studio command line argument to start unsloth studio UI 2026-01-20 07:27:05 +00:00