Skip to content

Multi-LoRA overflow test: read the kernel source as UTF-8 - #16544

Merged
danielhanchen merged 1 commit into
mainfrom
dh/multi-lora-overflow-test-utf8
Nov 3, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
dh/multi-lora-overflow-test-utf8

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Since #16414 (9a8b229714), Repo tests (CPU, rest-2) has been failing on unrelated PRs. It reproduces on current main, and it hit #16540 and #16509 in runs created after #16531 merged:

tests/test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding[2]
E   AssertionError: 1 file reads in the test trees touch a checked-in file with the platform default encoding, so they break on Windows as soon as that file gains a non-ASCII byte. Pass encoding = "utf-8": ['tests/test_multi_lora_scale_overflow_cpu.py:20: read_text()']

The new test from #16414 parses unsloth/kernels/multi_lora.py with a bare read_text(). That is the same pattern #16531 fixed in test_multi_lora_cold_compile_cpu.py. The guard is right: on Windows, a bare read uses the locale code page, so this test would break as soon as the kernel file gains a non-ASCII character. The kernel change in #16414 is fine.

Change

tests/test_multi_lora_scale_overflow_cpu.py line 20: read_text() becomes read_text(encoding = "utf-8").

Testing

  • tests/test_source_read_encoding.py:
    • main: 1 failed, 15 passed (the case above);
    • this branch: passes.
  • This branch, tests/test_source_read_encoding.py plus tests/test_multi_lora_scale_overflow_cpu.py: 28 passed.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T12:10:38.470756Z 9057cc1 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 9057cc1cb2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

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".

@danielhanchen
danielhanchen merged commit dadd36e into main Nov 3, 2026
@danielhanchen
danielhanchen deleted the dh/multi-lora-overflow-test-utf8 branch November 3, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant