Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dbb8b9c
unsloth eval
NilayYadav Jun 29, 2026
422e7e2
hide banners and warnings
NilayYadav Jun 29, 2026
372aa46
eval: fix I/O-on-closed-file by redirecting fds only
NilayYadav Jun 29, 2026
0232036
eval: stop tqdm leaking under TTY by not letting the spinner redirect…
NilayYadav Jun 29, 2026
ff5cb3e
flag handling across hf/unsloth backends, validate inputs, clean up
NilayYadav Jun 30, 2026
31d76a2
eval extra dependencies in install_python_stack
NilayYadav Jul 2, 2026
a858a2c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 2, 2026
db7ea0e
enhance resolve_base_model and task handling
NilayYadav Jul 2, 2026
cc1cb3b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 2, 2026
e8cfce4
more review addressed
NilayYadav Jul 2, 2026
93949fa
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 2, 2026
9a40d18
more fixes
NilayYadav Jul 2, 2026
23431c9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 2, 2026
12920a3
Add support for raw lookup in JSONL tasks and enhance task resolution…
NilayYadav Jul 2, 2026
63d528f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 2, 2026
aa2b365
task resolution validation and error handling in eval commands
NilayYadav Jul 2, 2026
42a0efc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 2, 2026
df11e71
more fixes
NilayYadav Jul 2, 2026
74fdce3
Add task specification loading and validation for YAML includes and r…
NilayYadav Jul 2, 2026
5f2d9e4
Validate device input and reject negative few-shot counts in evaluation
NilayYadav Jul 2, 2026
ead9c08
task resolution to reserve child names and validate positive limits …
NilayYadav Jul 2, 2026
91ccb5c
task specification loading to handle include precedence and resolve c…
NilayYadav Jul 3, 2026
d4044a7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 3, 2026
acfb3c6
more fix
NilayYadav Jul 3, 2026
54236dd
more fix
NilayYadav Jul 3, 2026
9bd0b7b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ windows = [
base = [
"unsloth[huggingface]",
]
eval = [
"unsloth[huggingface]",
"lm_eval>=0.4.4",
]
cu118only = [
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.22.post7%2Bcu118-cp39-cp39-manylinux2014_x86_64.whl ; python_version=='3.9' and ('linux' in sys_platform)",
"xformers @ https://download.pytorch.org/whl/cu118/xformers-0.0.22.post7%2Bcu118-cp310-cp310-manylinux2014_x86_64.whl ; python_version=='3.10' and ('linux' in sys_platform)",
Expand Down
24 changes: 24 additions & 0 deletions studio/install_python_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1922,6 +1922,26 @@ def pip_install(
temp_req.unlink(missing_ok = True)


def _install_eval_extra(*, package_name: str, local_repo: str) -> None:
"""Install pyproject.toml's [eval] extra (lm-eval-harness for `unsloth eval`)."""
if NO_TORCH or package_name != "unsloth":
return
_progress("eval extra")
if local_repo:
pip_install(
"Installing unsloth[eval] extra",
"--no-cache-dir",
"-e",
f"{local_repo}[eval]",
Comment thread
NilayYadav marked this conversation as resolved.
Outdated
)
else:
pip_install(
"Installing unsloth[eval] extra",
"--no-cache-dir",
"unsloth[eval]",
)


def download_file(url: str, dest: Path) -> None:
"""Download a file using urllib (no curl dependency)."""
urllib.request.urlretrieve(url, dest)
Expand Down Expand Up @@ -1977,6 +1997,8 @@ def install_python_stack() -> int:
base_total += 1 # ROCm torch check (line 1526) -- all non-macOS platforms
if not IS_WINDOWS:
base_total += 2 # flash-attn (line 1620) + ROCm torch final (line 1705) -- Linux only
if not NO_TORCH and package_name == "unsloth":
base_total += 1 # pyproject.toml [eval] extra
_TOTAL = (base_total - 1) if skip_base else base_total

# 1. Try uv for faster installs (before pip upgrade -- uv venvs don't
Expand Down Expand Up @@ -2197,6 +2219,8 @@ def _win_amd_smi_has_gpu(stdout: str) -> bool:
"Manual install may be required. See: https://docs.unsloth.ai/get-started/install-and-update/amd",
)

_install_eval_extra(package_name = package_name, local_repo = local_repo)

# 3. Extra dependencies
_progress("unsloth extras")
pip_install(
Expand Down
2 changes: 2 additions & 0 deletions unsloth_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from unsloth_cli.commands.chat import chat
from unsloth_cli.commands.connect import connect_app
from unsloth_cli.commands.export import export, list_checkpoints
from unsloth_cli.commands.eval import evaluate as eval_command
from unsloth_cli.commands.studio import (
run as studio_run,
studio_app,
Expand Down Expand Up @@ -76,6 +77,7 @@ def main(
app.command()(inference)
app.command()(chat)
app.command()(export)
app.command("eval")(eval_command)
app.command("list-checkpoints")(list_checkpoints)
app.add_typer(studio_app, name = "studio", help = "Unsloth Studio commands.")
app.add_typer(
Expand Down
Loading
Loading