acc_all_stderr raises ZeroDivisionError when a MultiRC question id repeats across paragraphs
Author: raunak2007Created Oct 1, 2026Updated Oct 1, 2026
acc_all groups by (paragraph_id, question_id) but acc_all_stderr groups by question_id alone (lm_eval/api/metrics.py:441). Question ids are only unique within a paragraph in MultiRC, so repeated ids collapse into one bucket in the stderr path. When the merged bucket has size 1, sample_stddev divides by len(arr) - 1 = 0:
lm_eval/api/metrics.py:339: ZeroDivisionError: float division by zeroBeyond the crash, the stderr is computed over different units than acc_all whenever ids repeat. Fix is to group acc_all_stderr on (paragraph_id, question_id) as well. Same class as #3882. Have a patch and a regression test ready.
Source: EleutherAI/lm-evaluation-harness