Repository navigation
Studio tests: run the shipped isServedByMlx rule in the auto-load harness - #19121
Merged
Merged
Conversation
…ness #19040 routed every Chat only MLX gate in chat-adapter.ts through isServedByMlx(..., mlxInference). The auto-load harness kept a hand copy of isServedByMlx that ignored mlx_inference, and a contract test pinned the old 'platform.mlxInference === true' literal, so three Studio tests went red on main. Inline the rule from per-model-config.ts and pin the new delegation instead of the old literal.
Member
Author
|
@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. What shall we delve into next? 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 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.
Problem
Three Studio tests are red on
mainsince #19040 (they fail onRepo tests (CPU, studio)for every PR based on it, for example #18775 and #19110):tests/studio/test_chat_autoload_failure_gate.py::test_a_chat_only_mac_without_mlx_skips_its_cached_mlx_repotests/studio/test_chat_autoload_failure_gate.py::test_a_chat_only_mac_auto_loads_an_omlx_folder_with_a_plain_name[false-False]tests/studio/test_model_picker_contracts.py::test_cached_non_gguf_rows_get_the_chat_only_platform_gateBisected: all three pass on
956e62778b^and fail on956e62778b(#19040).Cause
#19040 is correct. It routes every Chat only MLX gate in
chat-adapter.tsthrough the sharedisServedByMlx(isGguf, deviceType, chatOnlyReason, mlxInference), which answers frommlx_inferencewhen the backend reports it.The tests were behind it:
isServedByMlxthat took three arguments and ignoredmlx_inference. A Chat only Mac reportingmlx_inference: falsetherefore looked like it served MLX, and the scenarios loaded an MLX repo where the shipped code does not.platform.mlxInference === trueliteral, which Studio: repair MLX on Chat only Macs and offer MLX models exactly where they run #19040 replaced withreturn platformServesMlx(platform);.Fix
NO_MLX_REASONSandisServedByMlxfromper-model-config.tsas shipped, the same way it already inlinesisOtherCacheSnapshot,llamaServerLoadFieldsand the server-model wait gate. A missing definition fails with a clear message instead of a silent stub.platformServesMlx(platform), and that helper callsisServedByMlx(...)withplatform.mlxInference.Verification
main).typeof mlxInference === "boolean"branch fromisServedByMlxinper-model-config.ts; the two harness scenarios fail again.nullinstead ofplatform.mlxInferenceinchat-adapter.ts; the contract test and both scenarios fail.Tests only; no product code changes.