Skip to content

Commit

Permalink
fix: updated packge of sacrebleu changed the way it used to work, hen…
Browse files Browse the repository at this point in the history
…ce using the corpus_bleu from the main package
  • Loading branch information
init-22 committed Dec 1, 2024
1 parent 7cdea16 commit 7264c3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion algorithmic_efficiency/workloads/wmt/wmt_pytorch/workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from absl import logging
import jax
import sacrebleu
import tensorflow as tf
import torch
import torch.distributed as dist
Expand Down Expand Up @@ -162,7 +163,7 @@ def translate_and_calculate_bleu(self,
predictions.append(self._decode_tokens(predicted[idx]))

# Calculate BLEU score for translated eval corpus against reference.
bleu_score = bleu.corpus_bleu(predictions, [references]).score
bleu_score = sacrebleu.corpus_bleu(predictions, [references]).score
return bleu_score

def init_model_fn(
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ wmt =
sentencepiece==0.2.0
tensorflow-text==2.18.0
sacrebleu==2.4.3

# Frameworks #

# JAX Core
Expand Down

0 comments on commit 7264c3f

Please sign in to comment.