ParikhKadam / bidaf-keras

Bidirectional Attention Flow for Machine Comprehension implemented in Keras 2
GNU General Public License v3.0
64 stars 21 forks source link

AssertionError #6

Open nayanar03 opened 5 years ago

nayanar03 commented 5 years ago
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 commented 5 years ago

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..