Skip to content

DDP trainable-embeddings test: name utf-8 on the result file (rest-2 red since #18036) - #18072

Merged
danielhanchen merged 1 commit into
mainfrom
ci-ddp-worker-encoding
Nov 17, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci-ddp-worker-encoding

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, rest-2) fails on main since #18036 (seen on #18045, on 0d4793e1):

tests/test_source_read_encoding.py::test_checked_in_file_reads_name_an_encoding
AssertionError: 1 file reads in the test trees touch a checked-in file with the platform default encoding, ...
  'tests/_ddp_trainable_embeddings_worker.py:81: open()'

#18036 added tests/_ddp_trainable_embeddings_worker.py, which writes each rank's result JSON with open(path, "w"), so it uses the platform default encoding (cp1252 on Windows). The repo-wide guard requires every open() in the test trees to name an encoding.

The DDP change itself is fine; only the new helper missed the convention. The guard is doing its job.

Change

  • tests/_ddp_trainable_embeddings_worker.py: the result file is written with encoding = "utf-8".
  • tests/test_ddp_find_unused_default.py: the two read_text() calls that read those files back pass encoding = "utf-8" too, so the writer and the reader agree on every platform.

Verification

  • tests/test_source_read_encoding.py -k checked_in_file_reads: fails on main with the line above, passes with this change.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T04:35:35.309479Z 7205da6 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. You're on a roll.

Reviewed commit: 7205da6ff2

ℹ️ 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 f90ecaa into main Nov 17, 2026
@danielhanchen
danielhanchen deleted the ci-ddp-worker-encoding branch November 17, 2026 04:40
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