Fix BigBench multiple-choice crash on mixed-format tasks#3702
Open
Chessing234 wants to merge 1 commit intoEleutherAI:mainfrom
Open
Fix BigBench multiple-choice crash on mixed-format tasks#3702Chessing234 wants to merge 1 commit intoEleutherAI:mainfrom
Chessing234 wants to merge 1 commit intoEleutherAI:mainfrom
Conversation
Some BigBench subtasks (e.g. kanji_ascii) contain a mix of multiple-choice and free-form examples in the same dataset split. The multiple-choice templates crash with a ValueError when they encounter rows where `multiple_choice_targets` is an empty list. Add a `process_docs` filter that drops rows without multiple-choice targets before evaluation. Fixes EleutherAI#3636 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.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.
Bug
BigBench multiple-choice tasks crash with
ValueErroron subtasks that contain a mix of multiple-choice and free-form examples in the same dataset split (e.g.kanji_ascii).The Jinja template
{{multiple_choice_targets.index(targets[0])}}raisesValueError: 'u' is not in list(or similar) when it encounters a row wheremultiple_choice_targetsis an empty list.Root cause
generate_tasks.pydecides whether a subtask qualifies as multiple-choice by checking only the first example. Subtasks likekanji_asciihave multiple-choice examples at the start but free-form examples later (index 188+), wheremultiple_choice_targetsandmultiple_choice_scoresare both[].Fix
Add a
process_docsfilter to both multiple-choice template YAMLs that drops rows with emptymultiple_choice_targetsbefore evaluation. This follows the same pattern used by other tasks in the repo (e.g.crows_pairs,bbq).Three files changed:
lm_eval/tasks/bigbench/utils.py— one filter functionmultiple_choice_template_a_yaml— addedprocess_docslinemultiple_choice_template_b_yaml— addedprocess_docslineFixes #3636