huggingface / huggingface/lighteval
Fix KeyError in truthful_qa_generative_prompt
- Dominant language
- Python
- Stars
- 2.5k
- Forks
- 555
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 1
Description
## Describe the bug
The `truthful_qa_generative_prompt` function failed with a `KeyError: 'mc1_targets'` because it attempted to access a column that does not exist in the generative subset of the dataset.
## To Reproduce
```python
task = "truthfulqa:gen|5"
pipeline = Pipeline(
tasks=task,
pipeline_parameters=pipeline_params,
evaluation_tracker=evaluation_tracker,
model_config=model_config,
)
pipeline.evaluate()
pipeline.save_and_push_results()
pipeline.show_results()
```
## Expected behavior
The function should not attempt to access `mc1_targets` for the generative subset.
## Version info
- OS: mac
- Lighteval version: main (local development)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.