AttributeError when calling sacrebleu.compute in calculate_bleu_score
Description
After successfully installing the dependencies from requirements.txt
and requirements_eval.txt
, running python local_evaluation.py
results in an AttributeError
within the metrics.py
file, specifically at the last line of the calculate_bleu_score
function:
score = sacrebleu.compute(**bleu_args)["score"] / 100
The error message is:
AttributeError: module 'sacrebleu' has no attribute 'compute'
I am currently using sacrebleu
version 2.4.1.
Steps to Reproduce
- Install dependencies from
requirements.txt
andrequirements_eval.txt
. - Run
python local_evaluation.py
.
Possible Solution
It seems that the compute
function is not available in the installed version of sacrebleu
.
Please provide the correct version of sacrebleu
that includes the compute
function.