-
-
Notifications
You must be signed in to change notification settings - Fork 655
Closed
Labels
Description
The example provided in docs for Bleu is for Single input. In that case the output from the engine should be in this format
def evaluate_step():
...
predictions = "Predicted Sentence 1".split()
references = ["Reference Sentence 1".split(), "Reference Sentence 1.2".split()]
return (predictions, references)
When calculating Bleu score for a Batch what is the format for output from the engine?
It should be something like
#For a batch of size 2
predictions = ["Predicted Sentence 1".split(), "Predicted Sentence 2".split()]
references = [["Reference Sentence 1.1".split(), "Reference Sentence 1.2".split()], ["Reference Sentence 2.1".split(), "Reference Sentence 2.2".split()]]
Doing this gives an error.
TypeError: unhashable type: 'list'
The typing for update
requires predictions to be a Sequence[Any]
and References to be Sequence[Sequence[Any]]]
. Does this mean the batch input is not possible?