Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

RuntimeError: Need to set model argument to use create_agent #3472

Closed
vinnik-dmitry07 opened this issue Feb 25, 2021 · 8 comments
Closed

RuntimeError: Need to set model argument to use create_agent #3472

vinnik-dmitry07 opened this issue Feb 25, 2021 · 8 comments

Comments

@vinnik-dmitry07
Copy link
Contributor

RuntimeError: Need to set `model` argument to use create_agent.
Also I have KeyError: 'skip_generation' running DisplayModel.main.

You can reproduce it via the ParlAI Tutorial notebook.

@vinnik-dmitry07
Copy link
Contributor Author

It seems to be my bad.

@bashiryounis
Copy link

hello
I have a model trained I want to convert to ParlAI! how can do it!

@klshuster
Copy link
Contributor

where did you train it?

@bashiryounis
Copy link

pytorch using BertForSequenceClassification and dataset is Csv

@bashiryounis
Copy link

Enter text (q to quit): how are you
--- Text: how are you
--- Prediction: self.depression | Confidence: 0.4847826361656189
--- Confidence for each class
class confidence
0 self.Anxiety 0.179089
1 self.bipolar 0.158747
2 self.depression 0.484783
3 self.SuicideWatch 0.114597
4 self.offmychest
there is the output from my model I want to chat using parlai

@klshuster
Copy link
Contributor

klshuster commented Jul 26, 2022

you'd need to update the state dict to match one of our existing models; most likely, you're looking for our transformer/classifier agent; specifically, modifying the weights to be a linear wrapper around a memnet model

@bashiryounis
Copy link

is there a tutorial in docs about that! I am stuck at this point I want clear detail!

@klshuster
Copy link
Contributor

No, however, please see this script for an example of converting a fairseq checkpoint into a ParlAI model

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

3 participants