Closed xu1998hz closed 2 years ago
Your installation of fairseq
seems odd. Why do you have print(finalized)
?
Did you use my version of fariseq
?
I just printed myself to figure out some potential bugs
Yes, version is correct. The code works OK without using mention table
Show me the code you are running
I used "mention2wikidataID_with_titles_label_alias_redirect.pkl" and "wikidataID2lang_title-normalized_with_redirect.pkl" to add constraints on the search space. However, I received the following errors on one example.
The example was "LONDON, England (CNN) -- There are some circuits that are cornerstones of the Formula 1 calendar: the Monacos and [START] Silverstones [END] whose every twist and turn are known intimately by the drivers and engineers."
File ~/GENRE/fairseq/fairseq/sequence_generator.py:902, in(.0)
899 else:
900 print(finalized)
901 attn = [
--> 902 finalized[i // beam_size][i % beam_size]["attention"].transpose(1, 0)
903 for i in range(bsz * beam_size)
904 ]
906 if src_tokens.device != "cpu":
907 src_tokens = src_tokens.to("cpu")
IndexError: list index out of range