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

self.inferencer = Inferencer.load(model_name_or_path, batch_size=batch_size, gpu=use_gpu, task_type="question_answering") got an unexpected keyword argument 'task_type' #14

Closed
keherri opened this issue Jan 27, 2020 · 1 comment

Comments

@keherri
Copy link

keherri commented Jan 27, 2020

While attempting to work through the Finetuning tutorial, I came across this issue. I'm using git clone to install. I also uninstalled farm, and reinstalled farm-haystack using git clone.

In [3]: reader = FARMReader(model_name_or_path=model_dir, use_gpu=False)                                                                       
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-340e37bbe9ff> in <module>
----> 1 reader = FARMReader(model_name_or_path=model_dir, use_gpu=False)

~/Desktop/haystack/haystack/reader/farm.py in __init__(self, model_name_or_path, context_window_size, no_ans_threshold, batch_size, use_gpu, n_candidates_per_passage)
     51 
     52 
---> 53         self.inferencer = Inferencer.load(model_name_or_path, batch_size=batch_size, gpu=use_gpu, task_type="question_answering")
     54         self.inferencer.model.prediction_heads[0].context_window_size = context_window_size
     55         self.inferencer.model.prediction_heads[0].no_ans_threshold = no_ans_threshold

TypeError: load() got an unexpected keyword argument 'task_type'
@keherri
Copy link
Author

keherri commented Jan 27, 2020

It worked after I installed FARM using git clone

@keherri keherri closed this as completed Jan 27, 2020
masci pushed a commit that referenced this issue Nov 27, 2023
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

1 participant