Repository navigation
Conversation
Signed-off-by: Sueun Cho <sueun.dev@gmail.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
corpus_score(hyps, None)silently truncates to the shorter of the hypotheses and the cached references. With one cached reference, a matching first hypothesis and an extra incorrect hypothesis still produce a perfect BLEU/chrF score or zero TER. Passing those references explicitly already raises a length error after #294; this covers the cached path left over from that validation work (related to #220 and #281).Check the selected reference cache's length before extracting statistics. Putting the check here also covers
PairedTest, which calls the extractor directly. Tests cover shorter and longer hypothesis lists across BLEU/chrF/TER, valid cached scores with missing alternative references, explicit-reference overrides, sentence scoring, and mismatched baseline/candidate inputs in serial and multiprocessing significance tests.Checked on Python 3.12.14, Linux arm64:
python -m pytest -q --ignore=test/test_dataset.py -k 'not test_api_get_source and not test_api_get_reference': 197 passed, 6 deselected.mypy sacrebleu scripts testand Ruff on all tracked Python files passed.2.6.1.dev0version metadata.The dataset-download tests, CLI shell suite, optional Japanese/Korean tokenizers, and other Python/OS combinations were not run. An initial Ruff run also scanned generated build/version files in the source archive; the tracked-source check follows the repository's ignore rules.