Repository navigation
Clear stale bootstrap metadata when reusing metrics - #313
Open
kocean9-freedom wants to merge 1 commit into
Open
kocean9-freedom wants to merge 1 commit into
kocean9-freedom wants to merge 1 commit into
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.
After
metric.corpus_score(..., n_bootstrap=10), reusing the same BLEU, chrF or TER object for ordinary corpus or sentence scoring leavesbs:10|seed:12345inget_signature(), even though the new score has no confidence interval. A subsequent paired AR test without confidence estimation also inheritsbs:10. The reported reproducibility settings therefore depend on earlier calls.Reset the single-score bootstrap metadata after computing a new score, and clear inherited
bsmetadata beforePairedTestadds its own settings. Scoring, resampling and p-value calculations are unchanged. Previously returned signature objects retain their original settings.The regression tests compare reused and fresh metric instances across all three metrics, explicit/cached references, sentence scores, AR with and without confidence intervals, and paired BS. They also check that a later bootstrap call records its new count and seed. On unchanged master
c596d9d, 12 new cases fail and six controls pass; all pass with the fix.Validation on macOS with Python 3.12.14:
python -m pytest --ignore=test/test_api.py --ignore=test/test_dataset.py; three additional offline API tests pass. This includes the existing WMT17 significance comparisons.mypy sacrebleu scripts testpasses for 44 files. Ruff passes on the four changed files.Dataset-download tests, the network-heavy shell suite and other platforms were not run. This does not include the independent fixes in #311 or #312.
AI assistance: OpenAI Codex performed the investigation, implementation, tests, self-review and description. No independent human review has occurred.