Repository navigation
Tests: name the encoding in the gloo export guard, and treat a bare device index as CUDA in the YaRN load check - #15351
Merged
Conversation
…evice index as CUDA in the YaRN load check
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. |
This was referenced Oct 26, 2026
|
Codex Review: Didn't find any major issues. Breezy! 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
Two tests in the
Repo tests (CPU, rest)shard fail on main itself, so every PR based on it inherits them (seen on #15326 and #15339). Both are test bugs; the product code they guard is fine.1.
tests/test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding#15230 added
test_every_whole_model_export_is_guarded, which readsunsloth/save.pywith a bareopen(...).read(). That uses the locale encoding, which on Windows is the ANSI codepage. The read now namesencoding = "utf-8"and closes the file.2.
tests/test_yarn_rope_parameters_load.py::test_yarn_reaches_the_model[lang-*]#15214 added this subprocess check. It runs FastLanguageModel on a spoofed CUDA box and sends CUDA tensor allocations to the CPU through an
_is_cuda(device)helper. The rotary embedding allocates withdevice = get_current_device(), which is a bare index (0). The helper calledtorch.device(0), and on CPU-only torch 2.10 that resolves the index through the accelerator and raises before the YaRN assertion is reached. Themodelcases passed only because that path does not allocate with a bare index. A bare int is now treated as a CUDA ordinal without asking torch, and strings andtorch.devicevalues go throughtorch.device(...)as before.Verification
test_source_read_encoding.py1 failed andtest_yarn_rope_parameters_load.py2 failed. The yarn test also fails at Honour YaRN passed as rope_parameters, and rope_scaling on FastModel #15214's own merge commit (801ba6d), and Honour YaRN passed as rope_parameters, and rope_scaling on FastModel #15214 never ran arestshard.test_source_read_encoding.py: 16 passedtest_yarn_rope_parameters_load.py: 5 passedtest_parallel_general_gloo.py::test_every_whole_model_export_is_guarded: passed_fold_rope_parameterscall replaced byrope_scaling = None, bothlangcases now fail on the YaRN assertion itself ({'type': 'linear', 'factor': 4.0, ...}). Before this change they crashed first, so they could not catch a dropped YaRN.