afrobench nollysenti: every task fails with UndefinedError 'review' since the dataset dropped its loading script

Author: chrikrahCreated Oct 1, 2026Updated Oct 1, 2026

Every nollysenti_* task fails on its first document with UndefinedError: 'review' is undefined. All 25 configs, five languages by five prompts, render {{review}} and target label, and neither column exists any more.

Davlan/nollysenti deleted nollysenti.py on 2025-07-19 (8c37092) and now serves per-language TSV files with columns <lang>_review and sentiment. The old script built review and label from those two, and #3213 removed trust_remote_code for these configs without renaming them.

This is the "task needs updating" half of @Avelina9X's note on #3171. The later sweep there lists nollysenti as working because the dataset loads, but the tasks still fail at render, so I filed it separately.

At d6de816, datasets 5.0.1:

$ P='import sys,collections as c;from lm_eval.tasks import TaskManager;n=sys.argv[1];t=TaskManager().load_task_or_group([n])[n];d=list(t.test_docs());t.doc_to_text(d[0]);print(n,len(d),dict(c.Counter(map(t.doc_to_target,d))))'
$ for n in nollysenti_eng_prompt_1 nollysenti_pcm_prompt_3; do python -c "$P" $n 2>&1 | tail -1; done
jinja2.exceptions.UndefinedError: 'review' is undefined
jinja2.exceptions.UndefinedError: 'review' is undefined

Adding this to each prompt_*/utils.py, plus process_docs: !function utils.process_docs in each prompt_*/nollysenti base:

python
def process_docs(dataset):
    lang = next(c for c in dataset.column_names if c.endswith("_review"))
    return dataset.rename_columns({lang: "review", "sentiment": "label"})
$ for n in nollysenti_eng_prompt_1 nollysenti_yor_prompt_1 nollysenti_pcm_prompt_3; do python -c "$P" $n 2>&1 | tail -1; done
nollysenti_eng_prompt_1 500 {'positive': 250, 'negative': 250}
nollysenti_yor_prompt_1 500 {'positive': 250, 'negative': 250}
nollysenti_pcm_prompt_3 500 {'positive': 250, 'negative': 250}
# not run: scoring with a model

@baberabb I can open the pull request with those ten file changes this week, if you'd take it.

Source: EleutherAI/lm-evaluation-harness