Skip to content

fix(metrics): correct corpus_bleu reference structure in BleuScore#2889

Open
feiiiiii5 wants to merge 1 commit into
vibrantlabsai:mainfrom
feiiiiii5:fix/bleu-score-reference-structure
Open

fix(metrics): correct corpus_bleu reference structure in BleuScore#2889
feiiiiii5 wants to merge 1 commit into
vibrantlabsai:mainfrom
feiiiiii5:fix/bleu-score-reference-structure

Conversation

@feiiiiii5

Copy link
Copy Markdown

Fixes #2888. The references were passed as N streams of 1 segment each. sacrebleu's zip(*references) truncated at length 1 → only the first sentence was ever evaluated. Passes full text as single-segment corpus (consistent with ChrfScore). Adds regression tests.

References were passed as N streams of 1 segment each instead of 1 stream
of N segments. sacrebleu zip(*references) truncated at length 1, so only the
first sentence was evaluated — the rest silently discarded. Pass the full text
as a single-segment corpus, consistent with ChrfScore.

Fixes vibrantlabsai#2888.
@feiiiiii5

Copy link
Copy Markdown
Author

Note on the CI failures — neither is related to this change:

  • Claude Docs Check fails at checkout with Refusing to check out fork pull request code from a pull_request_target workflow — a repo-level security policy for external-fork PRs (the workflow would need allow-unsafe-pr-checkout: true, which only maintainers can decide).
  • CI shows action_required — external-fork runs need a maintainer to approve workflow execution.

The fix itself is covered by the regression tests in the diff (corpus_bleu reference-structure cases); happy to rebase or adjust if anything is needed to get the pipeline green.

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.

BleuScore evaluates only the first sentence (corpus_bleu reference structure bug)

1 participant