This commit is contained in:
Sofie Van Landeghem 2026-02-01 22:31:03 -06:00 committed by GitHub
commit 3a205e898f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -156,7 +156,8 @@ def evaluate_core(model, tokenizer, device, max_per_task=-1):
shuffle_rng = random.Random(1337)
shuffle_rng.shuffle(data)
if max_per_task > 0:
data = data[:max_per_task]
data_cutoff = max(task_meta['num_fewshot']+1, max_per_task)
data = data[:data_cutoff]
accuracy = evaluate_task(model, tokenizer, data, device, task_meta)
results[label] = accuracy