Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

AssertionError #6

Open
nayanar03 opened this issue May 15, 2019 · 1 comment
Open

AssertionError #6

nayanar03 opened this issue May 15, 2019 · 1 comment

Comments

@nayanar03
Copy link

in ()
42 print("**********************************************************")
43 print(question)
---> 44 y_output = bidaf_model.predict_ans(paragraph, question)
45 print(y_output)
46 data["predictions"].append(str(y_output))

1 frames
/content/bidaf-keras-master/bidaf/scripts/postprocess.py in get_word_char_loc_mapping(context, context_tokens)
43 for i, word in enumerate(context_tokens):
44 id = context.find(word, idx)
---> 45 assert not id == -1, "Error occurred while mapping word index to character index.. Please report this issue on our GitHub repo."
46
47 idx = id

AssertionError: Error occurred while mapping word index to character index.. Please report this issue on our GitHub repo.

any help would be appreciated

@ParikhKadam
Copy link
Owner

Yes.. this error occurs very rarely and hence I asked users to report this here. The problem is, this shouldn't happen logically but it still happens in some cases. The only reason I could not solve this error is because I don't have much amount of data to analyze in which case such error occurs.

In order to solve this issue, I will need the passage and question you provided as input to the model. Can you please tell me what code did you run which threw this error?

Thank you..

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

No branches or pull requests

2 participants