Repository navigation
Conversation
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.
Calling
corpus_score(...).format(is_json=True)without supplying the optional signature raisesValueError: not enough values to unpackfor BLEU, chrF and TER. The default empty signature is split as though it contained akey:valueparameter.Only expand signature parameters when a signature is present. JSON output without one retains the metric name, rounded score, empty signature and existing verbose information. Add regressions for omitted and explicitly empty signatures using all three public metric APIs.
Validation on Windows with Python 3.12.14:
test_metrics_base.pypasses all 53 cases.test_api.py,test_bleu.py,test_chrf.py,test_metrics_base.py,test_sentence_bleu.py,test_significance.py,test_ter.pyandtest_tokenizer_ter.py.mypy sacrebleu scripts test: no issues in 44 source files. Full Ruff check passes. The isolated source-distribution and wheel build succeeds.The full
python -m pytestrun exceeded a 900-second limit; a bounded follow-up was stopped attest_dataset.py::test_maybe_download. The full WMT/Perl CLI comparison script also exceeded a 360-second limit. Neither full suite is claimed as passing. No Linux or macOS test was run.