3

I am trying to execute bleurt matric for my task. I am new to bleurt when I try to execute scorer.score I get an error.

from bleurt import score

checkpoint = r".\bleurt\test_checkpoint"

references = ["This is a test."]

candidates = ["This is the test."]

scorer = score.BleurtScorer(checkpoint)

scores = scorer.score(references=references, candidates=candidates)

assert type(scores) == list and len(scores) == 1
print(scores)

when i try to execute the code i get this error

InvalidArgumentError: cannot compute __inference_pruned_8945 as input #0(zero-based) was expected to be a int64 tensor but is a int32 tensor [Op:__inference_pruned_8945]

M.K
  • 31
  • 2
  • Unfortunately this is a known [issue](https://github.com/google-research/bleurt/issues/9) and a PR has been ready [since January](https://github.com/google-research/bleurt/pull/44) but the Google team has not responded yet. In the mean time you should be able to install from that PR and it ought to work fine. – Bram Vanroy Sep 30 '22 at 12:55

0 Answers0