Repository navigation
Add tests for disk_utils fallback when unsloth_zoo lacks disk_utils - #17933
Merged
danielhanchen merged 4 commits intoNov 16, 2026
Merged
Conversation
…aring two free-space readings
Member
|
@codex review |
1 similar comment
Member
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. Delightful! 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". |
This was referenced Nov 16, 2026
Merged
danielhanchen
added a commit
that referenced
this pull request
Nov 16, 2026
…rest-2 red on main) (#17955) ## Summary `Repo tests (CPU, rest-2)` is red on main (seen on the staging run of #17933): ``` tests/test_ulysses_gemma4.py::test_gemma4_generic_route_gates E Failed: DID NOT RAISE NotImplementedError ``` Bisected to #17930 (the test passes on its parent, fails on it). #17930 deliberately stopped Gemma-4's vision and audio towers from deciding the context parallel route: CP batches are text only, so attention modules under a media tower are skipped by the route checks and get no Ulysses hooks. The test still expected `attach_attention_hooks` on a multimodal Gemma 4 to refuse with "Gemma4VisionAttention is bidirectional", which is exactly the refusal #17930 removed. The test is what is out of date. ## Change Test only, `tests/test_ulysses_gemma4.py::test_gemma4_generic_route_gates`: on the tiny multimodal Gemma 4, `attach_attention_hooks` now has to succeed, the model must actually have media tower attention, and the set of hooked `self_attn` modules must equal the text-stack ones exactly (no tower module hooked, no text module missed). That keeps the property the old refusal protected (bidirectional vision attention never runs through the causal Ulysses path) in the form #17930 implements it. ## Testing - `tests/test_ulysses_gemma4.py`: 24 passed (CPU, gloo). On main the test fails as above. - Sabotage: dropping the media tower check from the hook loop in `unsloth/context_parallel.py` makes the new assertion fail (`model.vision_tower.encoder.layers.0.self_attn` hooked).
danielhanchen
added a commit
that referenced
this pull request
Nov 16, 2026
…(rest red on main) (#17956) ## Summary `(Python 3.13, rest)` is red on main (seen on the staging run of #17933): ``` studio/backend/tests/multi_account/test_alice_bob_matrix.py::test_object_route_factory_completeness E AssertionError: ['routes.auth:PATCH:/api-keys/{key_id}'] ``` #17833 added `PATCH /api/auth/api-keys/{key_id}` (switch a key between full and inference access). The account isolation matrix requires every object route to have a factory, so it is exercised as owner / right user / wrong user / unauthenticated / deactivated, or to be listed as skipped with a reason. The new route had neither. The route itself is scoped correctly (`set_api_key_access` filters by the caller's key scope); it was only missing from the matrix. ## Change Test only: `studio/backend/tests/multi_account/factories.py` adds a factory for the route next to the existing `DELETE /api-keys/{key_id}` one: seed one of alice's keys, PATCH it to `{"access": "inference"}`, and expect the response to show `inference` for alice and a 404 for everyone else, with alice's data unchanged on every rejected call. ## Testing - The matrix rows for both api-key routes plus the completeness / skipped / factory checks: 15 passed. On main the completeness check fails as above. - Sabotage: with the key scope removed from `set_api_key_access` (any user can change any key), the new `[owner]` and `[wrong]` rows fail.
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.
Closes #17931
Adds tests/test_disk_utils_fallback.py, which loads unsloth/disk_utils.py with unsloth_zoo blocked so the fallback branch runs, then covers:
Tests only, no library changes. No torch or GPU needed.
Testing: pytest tests/test_disk_utils_fallback.py passes 17/17. Dropping .strip() from the override check makes 1 test fail, and making the stubs return 1 makes 2 fail.