Repository navigation
Avoid decoding unused features for single-column evaluator inputs - #907
Open
snygginghani wants to merge 1 commit into
Open
snygginghani wants to merge 1 commit into
snygginghani wants to merge 1 commit into
Conversation
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.
DatasetColumn reads a full row before returning the selected value. On a multimodal dataset, an evaluation using only the text column still decodes unrelated images or audio. An unusable file in an unrelated media column can also abort a text-only evaluation.
Project the unformatted dataset view to the selected column before reading rows. Formatted or transformed views retain the existing path because a transform can depend on other columns.
On an Intel Core i5-12400F with four PyTorch CPU threads, Transformers 4.57.6, and Datasets 2.21.0, I evaluated the first 32 actual ChartQA test images and questions repeated four times. The public text-generation evaluator used hf-internal-testing/tiny-random-gpt2, batch size 8, two new tokens, and the local word_count metric. Over eight alternating runs, adapter iteration went from 216.28 ms to 3.31 ms and the complete evaluator went from 569.11 ms to 321.16 ms. Inputs and metrics matched exactly (1,392 total words and 124 unique words).
Two focused tests cover an unused unreadable image and a custom transform that reads a second column. Black, isort, flake8 and git diff --check passed.
Prepared with AI assistance.