Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash while using mention table #79

Closed
xu1998hz opened this issue Jun 1, 2022 · 5 comments
Closed

Crash while using mention table #79

xu1998hz opened this issue Jun 1, 2022 · 5 comments

Comments

@xu1998hz
Copy link

xu1998hz commented Jun 1, 2022

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

@nicola-decao
Copy link
Contributor

Your installation of fairseq seems odd. Why do you have print(finalized)?

@nicola-decao
Copy link
Contributor

Did you use my version of fariseq?

@xu1998hz
Copy link
Author

xu1998hz commented Jun 1, 2022

I just printed myself to figure out some potential bugs

@xu1998hz
Copy link
Author

xu1998hz commented Jun 1, 2022

Yes, version is correct. The code works OK without using mention table

@nicola-decao
Copy link
Contributor

Show me the code you are running

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants