fix(asr): stop evaluate_eou returning negative false_negatives and missing - #16201
Open
Kayvan-Zahiri wants to merge 1 commit into
Open
fix(asr): stop evaluate_eou returning negative false_negatives and missing#16201Kayvan-Zahiri wants to merge 1 commit into
Kayvan-Zahiri wants to merge 1 commit into
Conversation
…ssing An early cutoff that r_idx later advanced past is recorded in earlycut_ids but is never added to the trailing unmatched-reference count. Subtracting the full set therefore takes both counters below zero. Discount only the early cutoffs the trailing block actually counted. Signed-off-by: Kayvan Zahiri <kayvanandre@gmail.com>
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.
evaluate_eoucan return negativefalse_negativesandmissing, which are counts.When a prediction cuts a reference short, the reference index goes into
earlycut_idsand
r_idxstays put. If a later prediction starts after that reference ends, thewhileloop advancesr_idxpast it, so the trailing "unmatched references" blocknever counts it. The unconditional
-= len(earlycut_ids)still subtracts it, and bothcounters go below zero.
Two references, one early cutoff followed by an exact hit:
The fix discounts only the early cutoffs the trailing block actually counted, so a
trailing early cutoff is still discounted as before. Two regression tests added; the
first fails on main, the second guards the existing behavior.
Existing
tests/collections/asr/test_asr_eou.pypasses before and after.