Parlai: how to deploy pretrained agents for conversations within python (i.e. no CLI)

Created on 14 Mar 2020  路  7Comments  路  Source: facebookresearch/ParlAI

Hi there!

I am trying to use ParlAI for a cognitive science project that requires chatbots interacting with humans over repeated iterations, taking into account the whole history of the conversation and storing the resulting conversations for later analysis.

For my setting, I'm mostly using pretrained models and have to use ParlAI's functionality within python (no command line). Finding out how to set up ParlAI agents and worlds from pretrained models without using CLI is proving really challenging.

Would it be possible to request an example script or a tutorial that could pedagogically introduced uninitiated users to deploying agents for purposes that are _not_ training or fine-tuning new models?
For my case use, that'd basically include examples of how to initialize agents and worlds from pretrained models, how to set them to 'interaction' mode, how to feed them at each conversational turn with the whole previous history of the conversation, and, potentially, how to store the conversation itself (this latter point should be trivial though, once figured out the previous ones).

I'm mostly planning on using LIGHT models, but figuring out the routine for any model would be absolutely fine.

Thank you in advance, and hope the question makes sense!

stale

Most helpful comment

You鈥檙e not wrong, our APIs make this somewhat complicated. I鈥檓 planning on writing a very extensive tutorial in the next month, with a draft in the next couple weeks. I can email you an early copy if you鈥檙e interested in providing feedback.

All 7 comments

You鈥檙e not wrong, our APIs make this somewhat complicated. I鈥檓 planning on writing a very extensive tutorial in the next month, with a draft in the next couple weeks. I can email you an early copy if you鈥檙e interested in providing feedback.

That would be awesome, and I'd be very happy to provide feedback!
You can reach me at roberta.[email protected].
Thanks a lot! 馃槉

Hi @rbroc and @stephenroller I have a similar requirement. I want to access blender90M model using python and without using CLI. I just want to pass text to it using my python script and get back a response.
Is this tutorial ready and can it be shared with me well?
Reach me at [email protected].

Thanks in advance!

I would like to get that tutorial to, i have such requirement
reach me at [email protected]

I did write a version of the tutorial. You can find it in this colab notebook. It makes it so that you can call standard scripts from python code, without going through the command line, but it's still very procedurally oriented. I think the original ask of a minimal example isn't quite there, but would love to see feedback on this colab notebook.

Hello @stephenroller,

I have a similar requirement too. Is this tutorial ready?
Please share with me ([email protected])

Thanks!

This issue has not had activity in 30 days. Please feel free to reopen if you have more issues. You may apply the "never-stale" tag to prevent this from happening.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ufukdogann picture Ufukdogann  路  6Comments

nihiluis picture nihiluis  路  7Comments

ntanhhus picture ntanhhus  路  6Comments

mvh57 picture mvh57  路  3Comments

roholazandie picture roholazandie  路  3Comments