Skip to content

fix(evals): load UTF-8 BOM JSONL data#4188

Open
fengjikui wants to merge 1 commit into
microsoft:mainfrom
fengjikui:codex/evals-utf8-sig-jsonl
Open

fix(evals): load UTF-8 BOM JSONL data#4188
fengjikui wants to merge 1 commit into
microsoft:mainfrom
fengjikui:codex/evals-utf8-sig-jsonl

Conversation

@fengjikui

Copy link
Copy Markdown

Summary

  • Load evaluation JSONL data with encoding="utf-8-sig" so files saved with a UTF-8 BOM are accepted.
  • Add a regression test for _validate_and_load_data using a UTF-8-SIG JSONL file.

Root cause

pd.read_json(..., lines=True) treats the leading BOM as part of the first JSON token and raises ValueError: Expected object or value for UTF-8-SIG JSONL files.

Fixes #3670

Validation

  • uv run --project src/promptflow-evals --with pandas python ... confirmed encoding="utf-8-sig" reads both UTF-8-SIG and normal UTF-8 JSONL.
  • src/promptflow-evals/.venv/bin/python -m pytest src/promptflow-evals/tests/evals/unittests/test_evaluate.py -q (28 passed)

@fengjikui fengjikui marked this pull request as ready for review June 22, 2026 15:45
@fengjikui fengjikui requested a review from a team as a code owner June 22, 2026 15:45
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

Hi, thank you for your interest in helping to improve the prompt flow experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment.

@github-actions github-actions Bot added the no-recent-activity There has been no recent activity on this issue/pull request label Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external no-recent-activity There has been no recent activity on this issue/pull request promptflow-evals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]prompt flow eval only supports UTF8 encoding

1 participant