Repository navigation
Keep the MLX inference test stub neutral for every helper zoo enters around a model - #12548
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. More of your lovely PRs please. 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 Oct 2, 2026
shimmyshimmer
pushed a commit
to shimmyshimmer/unsloth-staging-4
that referenced
this pull request
Oct 2, 2026
JoshuaL3000
pushed a commit
to JoshuaL3000/unsloth
that referenced
this pull request
Oct 4, 2026
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
unslothai/unsloth-zoo#1541 (merged 2026-10-02 13:15 UTC) added
nax_quantized_linearto the helpersunsloth_zoo/mlx/generate.pyimports from.inferenceand enters around the model during generation. Since then the macOSdispatchjob fails on every unsloth PR that runs it (first seen on #12530):studio/backend/tests/test_mlx_inference_backend.pyhas an autouse fixture that replacesunsloth_zoo.mlx.inferencewith a stub holding only the sixfused_*helpers ascontextlib.nullcontext, so the real-model tests generate without the fusions. Any helper zoo adds to that import list is missing from the stub. The product is fine; the stub was too narrow.Change
__getattr__that answers any other public name withcontextlib.nullcontext, the same neutral helper thefused_*names already get. Names starting withfused_and private names are not answered, sotest_mlx_missing_inference_export_keeps_native, which deletes a fused helper to simulate an older zoo, still sees it missing.test_the_stub_answers_every_helper_zoo_imports_from_inferencereads everyfrom .inference import .../from unsloth_zoo.mlx.inference import ...in the installedunsloth_zoo/mlx/*.pywithast(without importing zoo, which needs an accelerator) and asserts the stub answers each name. It skips when zoo's source is not available.test_an_unknown_zoo_helper_is_neutral_but_a_deleted_fusion_stays_missingpins both halves of the fallback.Verification
Linux, against unsloth-zoo main:
__getattr__fallback removedtest_mlx_missing_inference_export_keeps_native(6 cases)The failing real-model test only runs on Apple Silicon, so the macOS
dispatchjob on this PR is the end-to-end check.