Skip to main content

Unified platform for dialogue research.

Project description


ParlAI (pronounced “par-lay”) is a python framework for sharing, training and testing dialogue models, from open-domain chitchat, to task-oriented dialogue, to visual question answering.

Its goal is to provide researchers:

ParlAI is described in the following paper: “ParlAI: A Dialog Research Software Platform", arXiv:1705.06476 or see these more up-to-date slides.

Follow us on Twitter and check out our Release notes to see the latest information about new features & updates, and the website http://parl.ai for further docs. For an archived list of updates, check out NEWS.md.

Interactive Tutorial

For those who want to start with ParlAI now, you can try our Colab Tutorial.

Installing ParlAI

ParlAI currently requires Python3.7+ and Pytorch 1.6 or higher. Dependencies of the core modules are listed in requirements.txt. Some models included (in parlai/agents) have additional requirements. We strongly recommend you install ParlAI in a venv or conda environment.

Standard Installation

If you want to use ParlAI without modifications, you can install it with:

pip install parlai

Development Installation

Many users will want to modify some parts of ParlAI. To set up a development environment, run the following commands to clone the repository and install ParlAI:

git clone https://github.com/facebookresearch/ParlAI.git ~/ParlAI
cd ~/ParlAI; python setup.py develop

All needed data will be downloaded to ~/ParlAI/data. If you need to clear out the space used by these files, you can safely delete these directories and any files needed will be downloaded again.

Documentation

Examples

A large set of scripts can be found in parlai/scripts. Here are a few of them. Note: If any of these examples fail, check the installation section to see if you have missed something.

Display 10 random examples from the SQuAD task

parlai display_data -t squad

Evaluate an IR baseline model on the validation set of the Personachat task:

parlai eval_model -m ir_baseline -t personachat -dt valid

Train a single layer transformer on PersonaChat (requires pytorch and torchtext). Detail: embedding size 300, 4 attention heads, 2 epochs using batchsize 64, word vectors are initialized with fasttext and the other elements of the batch are used as negative during training.

parlai train_model -t personachat -m transformer/ranker -mf /tmp/model_tr6 --n-layers 1 --embedding-size 300 --ffn-size 600 --n-heads 4 --num-epochs 2 -veps 0.25 -bs 64 -lr 0.001 --dropout 0.1 --embedding-type fasttext_cc --candidates batch

Code Organization

The code is set up into several main directories:

  • core: contains the primary code for the framework
  • agents: contains agents which can interact with the different tasks (e.g. machine learning models)
  • scripts: contains a number of useful scripts, like training, evaluating, interactive chatting, ...
  • tasks: contains code for the different tasks available from within ParlAI
  • mturk: contains code for setting up Mechanical Turk, as well as sample MTurk tasks
  • messenger: contains code for interfacing with Facebook Messenger
  • utils: contains a wide number of frequently used utility methods
  • crowdsourcing: contains code for running crowdsourcing tasks, such as on Amazon Mechanical Turk
  • chat_service: contains code for interfacing with services such as Facebook Messenger
  • zoo: contains code to directly download and use pretrained models from our model zoo

Support

If you have any questions, bug reports or feature requests, please don't hesitate to post on our Github Issues page. You may also be interested in checking out our FAQ and our Tips n Tricks.

Please remember to follow our Code of Conduct.

Contributing

We welcome PRs from the community!

You can find information about contributing to ParlAI in our Contributing document.

The Team

ParlAI is currently maintained by Moya Chen, Emily Dinan, Dexter Ju, Mojtaba Komeili, Spencer Poff, Pratik Ringshia, Stephen Roller, Kurt Shuster, Eric Michael Smith, Megan Ung, Jack Urbanek, Jason Weston, Mary Williamson, and Jing Xu. Stephen Roller is the current Tech Lead.

Former major contributors and maintainers include Alexander H. Miller, Margaret Li, Will Feng, Adam Fisch, Jiasen Lu, Antoine Bordes, Devi Parikh, Dhruv Batra, Filipe de Avila Belbute Peres, Chao Pan, and Vedant Puri.

Citation

Please cite the arXiv paper if you use ParlAI in your work:

@article{miller2017parlai,
  title={ParlAI: A Dialog Research Software Platform},
  author={{Miller}, A.~H. and {Feng}, W. and {Fisch}, A. and {Lu}, J. and {Batra}, D. and {Bordes}, A. and {Parikh}, D. and {Weston}, J.},
  journal={arXiv preprint arXiv:{1705.06476}},
  year={2017}
}

License

ParlAI is MIT licensed. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parlai-1.4.1.tar.gz (864.5 kB view details)

Uploaded Source

Built Distribution

parlai-1.4.1-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file parlai-1.4.1.tar.gz.

File metadata

  • Download URL: parlai-1.4.1.tar.gz
  • Upload date:
  • Size: 864.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.9

File hashes

Hashes for parlai-1.4.1.tar.gz
Algorithm Hash digest
SHA256 ff08d70f5d9f5afe7b9de84e55c8511849d950046e8d2f0ae6c8ae018e759738
MD5 6a71a2f64e9bd2d53eb81acd0f1f1d02
BLAKE2b-256 0e230ec29f86aa959df3e82e5bd4728c96cd077b8f2911ac5f6e97ccbeb1983e

See more details on using hashes here.

Provenance

File details

Details for the file parlai-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: parlai-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.9

File hashes

Hashes for parlai-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bb1085b136df51a337c20640e5654ba98b8178141f1ff34d88ba648f740622e1
MD5 c9af6c466f1c9b25c43cec7b43ba6d3e
BLAKE2b-256 bbcb9a80234d754fb0778af1dcb8af247fba138d95d7b7c5feab91c27bf88f4e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page