Repository navigation
No-torch install harness: model a feed that resolves the Unsloth / Zoo pair - #16532
Merged
Merged
Conversation
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
Nov 3, 2026
) ## Summary `Repo tests (CPU, studio-install)` is still red on main after #16532. That PR fixed the shared no-torch harness in `test_no_torch_filtering.py`. A second test class has the same problem: it runs `install_python_stack()` in no-torch mode with `subprocess.run` mocked. It failed on #16534 and #16527, both of which ran on top of #16532: ``` tests/studio/install/test_rocm_support.py::TestProgressStepCountMatchesTotal::test_progress_reaches_total_without_torch[linux-False] tests/studio/install/test_rocm_support.py::TestProgressStepCountMatchesTotal::test_progress_reaches_total_without_torch[windows-False] tests/studio/install/test_rocm_support.py::TestProgressStepCountMatchesTotal::test_progress_reaches_total_without_torch[macos_arm-False] E RuntimeError: Could not resolve a compatible unsloth / unsloth-zoo pair for no-torch mode ``` The cause is the same as in #16532. Since #16157, a no-torch install resolves a compatible Unsloth / Zoo pair from wheel metadata, and it refuses only when the feed has no such pair. That is right for users, since such an install would fail anyway. `_run_stack` mocks `subprocess.run` to return nothing, so the probe finds no metadata and the full-pass (`SKIP_STUDIO_BASE=0`) cases stop before they reach the progress count they check. ## Change `tests/studio/install/test_rocm_support.py`, `TestProgressStepCountMatchesTotal._run_stack` only: `_no_torch_pair` returns a compatible pair, which models a feed that serves one. This is the same model as #16532. `NO_TORCH` and the new patch share one `patch.multiple`. That `with` statement already holds 20 context managers, which is Python's limit on nested blocks: a 21st `patch.object` makes the whole file fail to import with `SyntaxError: too many statically nested blocks`. The patched values are otherwise unchanged. ## Testing `tests/studio/install/test_rocm_support.py`: - main: 3 failed, 686 passed (the three cases above); - this branch: 689 passed, 2 skipped. I also ran `tests/studio/install` plus `tests/python` on this branch. "Could not resolve a compatible" no longer appears anywhere. 22 other tests fail locally, in `test_dependency_pass_skips.py` and `test_e2e_no_torch_sandbox.py`, and they fail the same way on main here. CI passes them in the same shard, so the cause is this host's environment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Since #16157 (
95aae40bb4), three installer tests fail on main. On staging CI,Repo tests (CPU, studio-install)failed on #16423, #16182 and #16523 in the last hour:#16157 makes every no-torch install pin a compatible Unsloth / Zoo pair, read from wheel metadata by
_no_torch_pair, and refuse when none resolves. That is deliberate, and its own tests cover it with real offline wheels. The refusal can only trigger when the feed cannot serve Unsloth's metadata, and then the no-deps install would fail anyway, so I left the product as it is.All three failing tests run
install_python_stack()throughTestInstallPythonStackSubprocessMock._capture_install, which mocks everysubprocess.runto return 0 and write nothing. The pair probe then finds no installed metadata and returnsNone, so every no-torch update path through this harness now stops before reaching what the test checks: the CA trust floor, and the Intel macOS override and triton skips.Change
tests/python/test_no_torch_filtering.py:_capture_installalso patchesips._no_torch_pairto return a resolved pair, modelling a feed that serves one, as a real index does. No assertion changes. The pair logic itself stays covered bytests/python/test_desktop_unsloth_spec_no_deps_pair.py, which runs the real probe against real wheels.Testing
tests/python/test_no_torch_filtering.py,tests/studio/install/test_ca_trust_floor.py,tests/python/test_install_python_stack.pyandtests/python/test_desktop_unsloth_spec_no_deps_pair.py: