Skip to content

Studio updater: install a matched unsloth + unsloth-zoo pair when the index lags - #14834

Merged
danielhanchen merged 4 commits into
mainfrom
dh/s3-updater-compatible-pair
Oct 23, 2026
Merged

danielhanchen merged 4 commits into
mainfrom
dh/s3-updater-compatible-pair

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

The Desktop backend floor in install_python_stack.py only checked that unsloth>=X exists on the index, without checking that the index also has the unsloth-zoo that release requires. When the fallback lowered the floor it returned only an unsloth pin, so the no-torch update (which installs --no-deps) took whatever unsloth-zoo the resolver picked.

Effects on a lagging index:

  • zoo behind the requested unsloth: the default update fails as unsatisfiable, and the no-torch update silently installs unsloth X with an older zoo below its floor
  • lowered fallback under UV_RESOLUTION=lowest: the no-torch update installs the oldest zoo

Changes:

  • probe the requested floor together with unsloth-zoo, with dependencies, on a fixed linux platform so hosts without torch wheels can still resolve it
  • otherwise lower to the newest unsloth + unsloth-zoo pair that resolves, and install both pins, matching install.sh / install.ps1
  • unchanged when the index has the requested release and its zoo: same single probe, same specs

Tests: TestDesktopBackendVersionConstraint now models zoo floors; 5 new cases fail on main and pass here.

tests/python/test_install_python_stack.py: 310 passed (305 on main); tests/studio/install unchanged (same 4 failures and 8 collection errors as main). Not run: a real Desktop update on Windows, macOS or an Intel Mac.

… index lags

The Desktop backend floor probe only checked that unsloth>=X exists, ignoring
whether the index has the unsloth-zoo it requires, and the lowered fallback
returned only an unsloth pin, leaving the no-torch --no-deps install to pick an
unconstrained zoo. Probe the requested floor with dependencies, lower to the
newest resolvable pair otherwise, and pin both packages in the install.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T00:50:51.834383Z 326f472 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b68f9041b7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread studio/install_python_stack.py Outdated
Comment on lines +10632 to +10633
if (resolve(spec, zoo_spec, deps = True) or {}).get("unsloth"):
return spec, zoo_spec

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Pin the resolved zoo on the successful probe

When the requested pair exists but the no-torch updater runs with UV_RESOLUTION=lowest, this success branch discards the zoo version found by resolve() and returns a bare unsloth-zoo. The install at lines 12923-12933 uses --no-deps; uv pip install --help confirms that this ignores package dependencies and that --resolution controls selection among compatible direct requirements, so uv can install the oldest zoo below the selected unsloth's declared floor (and emits an unpinned-direct-dependency warning). Carry the resolved zoo pin into the no-torch install just as the fallback branch does.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 326f472: when the requested pair resolves, the zoo it resolved against is returned as unsloth-zoo>=X, so the --no-deps no-torch install cannot pick a zoo below unsloth's floor under UV_RESOLUTION=lowest; with the default resolution it installs the same newest zoo as before.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 326f472820

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

danielhanchen added a commit that referenced this pull request Oct 23, 2026
… in #14822 (#14852)

pre-commit.ci fails `ruff-format-with-kwargs` again on PRs queued after
00:36 UTC (#14834, #14835, #14836, #14842, #14845):
`studio/backend/tests/test_video_stream_encode.py` was merged in #14822
without the formatter, so every PR's all-files run rewrites it.

Same class as #14817. `python scripts/run_ruff_format.py` (the hook's
entry point, `ruff==0.6.9`) applied to that one file. The AST is
identical before and after, `ruff check` passes, and a full run of the
hook over every tracked Python file on this branch changes nothing else.
[skip ci]
@danielhanchen
danielhanchen merged commit 3cf1617 into main Oct 23, 2026
@danielhanchen
danielhanchen deleted the dh/s3-updater-compatible-pair branch October 23, 2026 02:46
danielhanchen added a commit that referenced this pull request Oct 23, 2026
… (#14878)

Two files merged at 02:46 UTC without the repo formatter, so
pre-commit.ci's `ruff-format-with-kwargs` hook (which runs on all files)
will rewrite them on every PR queued after that:

- `studio/install_python_stack.py` from #14834
- `studio/backend/tests/test_diffusion_prequant_cache.py` from #14819

Same class as #14817 and #14852. `python scripts/run_ruff_format.py`
(the hook's entry point, `ruff==0.6.9`) applied to those two files. Both
parse to identical ASTs before and after, `ruff check` passes, and a
full run of the hook over every tracked Python file on this branch
changes nothing else.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant