-
Notifications
You must be signed in to change notification settings - Fork 19
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
TypeError: from_params() takes 2 positional arguments but 4 were given #17
Comments
I meet a similar problem, but I have "3 were given"...😂 I do not know how to solve it ........ |
If you run it on version 0.5.1 ,the demo can be operated. But training has some problems. If you get the result ,please tell me. Thanks. |
Do you mean pytorch 0.4.1? I also met 2 import errors in "nrl/service/server_simple_gpu.py", Do you have any idea with these? Thanks. |
allennlp version=0.5.1 你可以试一下 |
This code was built for allennlp 0.5.0 and pytorch 0.4.0. |
OK, I will try later.Thanks for your reply. |
when I train the model, I face an error like this:
Platform: ubuntu 14/allennlp==0.5.1/torch==0.4.0 |
That's works for predication, thank you~ I changed |
Have you run the training model smoothly? |
I did not run the training model, because I only need to parse several documents with the pretrained model .... |
for the import error "allennlp.service.server_flask import ServerError", change it to "allennlp.service.server_simple import ServerError" |
pytorch 0.4.0 is not available now. |
After reading "QA-SRL", I ran the code after installing Allennlp 0.8.3. It reported an error:"TypeError: from_params() takes 2 positional arguments but 4 were given"
File "/home/lixin/Documents/qasrl-bank-master/nrl-qasrl-master/nrl/models/qasrl_parser.py", line 34, in from_params
span_detector = Model.from_params(vocab, params.pop("span_detector"))
TypeError: from_params() takes 2 positional arguments but 3 were given.
I can't find the function from_params() in the class 'model'.
So,is it the reason for the framework version? How can i solve it .
I am a beginner, thank you for your help.
The text was updated successfully, but these errors were encountered: