-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Could you help resolve this error from finder while inferencing (trying out your tutorial six) #218
Comments
Hi usaraj, that error makes me think that you might be using a later version of Haystack but an earlier and incompatible version of FARM. Could you check which versions you have? If this is the case, you can solve this by installing the latest master version of Haystack from GitHub (which will in turn install the right version of FARM). You can do this with something like: Let me know how this goes! |
Hi brandehchan, Thanks for your response. I think when I installed it it was from a specific branch of haystack in the tutorial. I am using colab and have to reinstall it every time I restart the notebook. Probably should have frozen the branch that I originally worked on. In colab, another issue I am facing is the version of torch required by farm uninstalls the version preinstalled and then colab complains of changing run time to standard from GPU. Right now I am reinstalling torch 1.5.0+cu101 to get GPU to work. I tried your suggestion. After pip isntall After pip isntall ModuleNotFoundError Traceback (most recent call last) ModuleNotFoundError: No module named 'haystack.reader' |
Hi brandehchan, the error in my earlier post refers to when I was trying to clone haystack to my google drive and from within colab install from haystack directory in mounted drive. When it did not work, I tried your suggestion and installed haystack directly into the colab content directory (non-persistent environment), I was able to train a model and save it. But when I use the saved model to evaluate directly on a small dataset squad formatted file, I get the following KeyError: Here are the relevant commands and trace back from colab: Evaluation of Reader can also be done directly on a SQuAD-formatted filereader_eval_results = new_reader.eval_on_file("/content/drive/My Drive/data", "cdqa-v9.json", device=device)
|
Hi! I am a newbie trying out your tutorial 6 with dense retriever and a fine tuned custom roberta2-squad2 reader model.
When I first downloaded from git via pip two days ago it was working fine.
However, since this morning I am getting an error during prediction. Here is the traceback with error:
TypeError Traceback (most recent call last)
in ()
2 q = input('Question: ')
3 #prediction = finder.get_answers_via_similar_questions(question=q, top_k_retriever=5)
----> 4 prediction = finder.get_answers(question=q, top_k_retriever=10, top_k_reader=5)
5 print('query: {}'.format(q))
6 print_answers(prediction, details="minimal")
/content/drive/My Drive/haystack/haystack/reader/farm.py in predict(self, question, documents, top_k)
243 # get answers from QA model
244 predictions = self.inferencer.inference_from_dicts(
--> 245 dicts=input_dicts, return_json=True, multiprocessing_chunksize=1
246 )
247 # assemble answers from all the different documents & format them.
TypeError: inference_from_dicts() got an unexpected keyword argument 'return_json'
Any help to resolve this issue would be greatly appreciated?
The text was updated successfully, but these errors were encountered: