Repository navigation
Batch flat record comparisons in ordered sequence alignment - #170
Merged
Merged
Conversation
Author
|
for the record we don't have arrays in ExtractBench's main data that would need this kind of evaluation -- Datalab + Oklahoma is a hypothetical, if we turn on |
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.
Summary
Speed up scoring for ordered arrays of flat records. The scorer batches exact field comparisons and computes one alignment row at a time in NumPy. Each row still considers every candidate pairing, and ties retain the same priority. This matters when two predictions have the same value but cite different locations.
For example, given expected rows A B C D E and predicted rows A B D E C, the alignment still credits A, B, D, and E. Fuzzy fields, distinct accepted alternatives, and custom normalizers use the existing field matcher.
Benchmark
Local scoring times on saved Datalab Oklahoma outputs with ordered matching enabled for the owners array.
Fast was 17.6× faster. The full Balanced and Accurate baseline comparisons were stopped before completion.
Test plan