mirror of
https://github.com/deepseek-ai/DeepSeek-Coder.git
synced 2026-11-05 00:57:19 +00:00
[PR #722] Decode evaluation JSONL consistently as UTF-8 #296
Labels
No labels
documentation
ENV
pull-request
research question
WIP
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-Coder#296
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepSeek-Coder/pull/722
Author: @determine123
Created: 10/20/2026
Status: 🔄 Open
Base:
main← Head:fix/eval-gzip-utf8📝 Commits (1)
e39cf5dfix(eval): decode compressed JSONL inputs as UTF-8📊 Changes
4 files changed (+69 additions, -4 deletions)
View changed files
📝
Evaluation/HumanEval/human_eval/data.py(+1 -1)📝
Evaluation/LeetCode/human_eval/data.py(+2 -2)📝
Evaluation/MBPP/human_eval/data.py(+1 -1)➕
tests/test_eval_jsonl_encoding.py(+65 -0)📄 Description
The HumanEval, MBPP and LeetCode copies of
stream_jsonldecode gzip input using the locale's default encoding, whereas their writers emit UTF-8 bytes. This can silently corrupt non-ASCII prompts or raiseUnicodeDecodeErrorwhen reading externally produced UTF-8 JSONL with unescaped Unicode. LeetCode's plain-text reader also uses the default encoding.Specify UTF-8 for the three gzip readers and the LeetCode plain reader, matching the existing HumanEval/MBPP plain-reader behavior. No generation or scoring behavior is changed.
Validation (Python 3.12.10, Windows, CPU only):
-X utf8=0and CP936 default encoding read a UTF-8 gzip prompt containing Chinese and emoji as different characters before this fix.python -m unittest discover -s tests -p test_eval_jsonl_encoding.py -v: 3 test methods / 9 subtest scenarios pass. Tests cover all three evaluation directories, UTF-8 gzip under an emulated ASCII default at the standard-library I/O boundary, plain UTF-8, and gzip write/append/read round trips. On the original readers, the ASCII-default gzip cases error in all three suites; the LeetCode plain-reader case also fails on this CP936 host.python -m ruff check --select E9,F63,F7,F82 tests/test_eval_jsonl_encoding.py Evaluation/HumanEval/human_eval/data.py Evaluation/MBPP/human_eval/data.py Evaluation/LeetCode/human_eval/data.pygit diff --checkThe tests execute the actual data-reader modules without model dependencies. Full model generation and execution-based benchmark scoring were not run. AI assistance was used for analysis, implementation, testing and drafting.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.