Repository navigation
Tests: pin the preset GPU selection the way #19154 keeps it - #19237
Merged
Merged
Conversation
#19154 made applyPresetLoadConfig start from currentRuntimePerModelConfig() instead of listing the store fields a preset keeps, so test_apply_skips_missing_load_config, which looked for the literal "selectedGpuIds: store.selectedGpuIds", fails on main. Check the mechanism instead: the preset spreads the current config, that config carries the store's selectedGpuIds, and the preset never names selectedGpuIds. The behavioral test #19154 added set selectedGpuIds to null, the default, so a preset that cleared the selection still passed it. Give it a real selection.
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. Another round soon, 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 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
tests/studio/test_chat_preset_load_config.py::test_apply_skips_missing_load_configfails on main inRepo tests (CPU, studio). Open PRs inherit it, for example #19141, which only touches the CLI:Cause
#19154 (keep the custom chat template when applying a chat preset) is correct.
applyPresetLoadConfigused to start fromDEFAULT_PER_MODEL_CONFIGand list the store fields a preset keeps (selectedGpuIds: store.selectedGpuIds, the MLX and engram knobs). It now starts fromcurrentRuntimePerModelConfig(), so a preset changes only its own fields. That config returnsselectedGpuIds: s.selectedGpuIds, so the GPU selection is still kept.The test pinned the old spelling rather than the behavior.
The frontend test #19154 added,
preset-keeps-chat-template.test.ts, has a gap of its own. It checks that every non-preset field is unchanged, but it setsselectedGpuIds: null, which is the default. A preset that cleared the GPU selection still passed it.Fix
test_apply_skips_missing_load_confignow checks the mechanism:applyPresetLoadConfigspreadscurrentRuntimePerModelConfig();selectedGpuIds;selectedGpuIdsitself.preset-keeps-chat-template.test.tssets a real selection ([1, 0], physical indexes), so its unchanged-fields loop actually covers the GPU selection.Verification
test_chat_preset_load_config.py: fails on main, 16 passed here.preset-keeps-chat-template.test.ts: 6 pass.DEFAULT_PER_MODEL_CONFIGagain;selectedGpuIds: nullto the preset.