%global _empty_manifest_terminate_build 0 Name: python-parlai Version: 1.7.2 Release: 1 Summary: Unified platform for dialogue research. License: MIT License URL: http://parl.ai/ Source0: https://mirrors.aliyun.com/pypi/web/packages/b7/73/a20eac14b2e7386ff691db02550d956739aa2f2156447bd9f06b30360766/parlai-1.7.2.tar.gz BuildArch: noarch Requires: python3-coloredlogs Requires: python3-datasets Requires: python3-docutils Requires: python3-emoji Requires: python3-fairscale Requires: python3-docformatter Requires: python3-flake8-bugbear Requires: python3-flake8 Requires: python3-fuzzywuzzy Requires: python3-google-cloud-storage Requires: python3-iopath Requires: python3-gitdb2 Requires: python3-GitPython Requires: python3-hydra-core Requires: python3-ipython Requires: python3-torch Requires: python3-torchvision Requires: python3-joblib Requires: python3-nltk Requires: python3-omegaconf Requires: python3-pandas Requires: python3-pytest-regressions Requires: python3-pytest Requires: python3-pexpect Requires: python3-Pillow Requires: python3-py-gfm Requires: python3-py-rouge Requires: python3-pyyaml Requires: python3-pyzmq Requires: python3-regex Requires: python3-myst-parser Requires: python3-attrs Requires: python3-requests-mock Requires: python3-requests Requires: python3-scikit-learn Requires: python3-scipy Requires: python3-sh Requires: python3-sphinx-rtd-theme Requires: python3-sphinx-autodoc-typehints Requires: python3-Sphinx Requires: python3-subword-nmt Requires: python3-tensorboardX Requires: python3-tokenizers Requires: python3-tomli Requires: python3-torchtext Requires: python3-tornado Requires: python3-tqdm Requires: python3-typing-extensions Requires: python3-Unidecode Requires: python3-urllib3 Requires: python3-websocket-client Requires: python3-jsonlines Requires: python3-numpy Requires: python3-markdown Requires: python3-jinja2 Requires: python3-ninja Requires: python3-protobuf Requires: python3-contractions Requires: python3-fsspec Requires: python3-google-api-core %description [ParlAI](http://parl.ai) (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: - **100+ popular datasets available all in one place, with the same API**, among them [PersonaChat](https://arxiv.org/abs/1801.07243), [DailyDialog](https://arxiv.org/abs/1710.03957), [Wizard of Wikipedia](https://openreview.net/forum?id=r1l73iRqKm), [Empathetic Dialogues](https://arxiv.org/abs/1811.00207), [SQuAD](https://rajpurkar.github.io/SQuAD-explorer/), [MS MARCO](http://www.msmarco.org/), [QuAC](https://www.aclweb.org/anthology/D18-1241), [HotpotQA](https://hotpotqa.github.io/), [QACNN & QADailyMail](https://arxiv.org/abs/1506.03340), [CBT](https://arxiv.org/abs/1511.02301), [BookTest](https://arxiv.org/abs/1610.00956), [bAbI Dialogue tasks](https://arxiv.org/abs/1605.07683), [Ubuntu Dialogue](https://arxiv.org/abs/1506.08909), [OpenSubtitles](http://opus.lingfil.uu.se/OpenSubtitles.php), [Image Chat](https://arxiv.org/abs/1811.00945), [VQA](http://visualqa.org/), [VisDial](https://arxiv.org/abs/1611.08669) and [CLEVR](http://cs.stanford.edu/people/jcjohns/clevr/). See the complete list [here](https://github.com/facebookresearch/ParlAI/blob/main/parlai/tasks/task_list.py). - a wide set of [**reference models**](https://parl.ai/docs/agents_list.html) -- from retrieval baselines to Transformers. - a large [zoo of **pretrained models**](https://parl.ai/docs/zoo.html) ready to use off-the-shelf - seamless **integration of [Amazon Mechanical Turk](https://www.mturk.com/mturk/welcome)** for data collection and human evaluation - **integration with [Facebook Messenger](https://parl.ai/docs/tutorial_chat_service.html)** to connect agents with humans in a chat interface - a large range of **helpers to create your own agents** and train on several tasks with **multitasking** - **multimodality**, some tasks use text and images ParlAI is described in the following paper: [“ParlAI: A Dialog Research Software Platform", arXiv:1705.06476](https://arxiv.org/abs/1705.06476) or see these [more up-to-date slides](https://drive.google.com/file/d/1JfUW4AVrjSp8X8Fp0_rTTRoLxUfW0aUm/view?usp=sharing). Follow us on [Twitter](https://twitter.com/parlai_parley) and check out our [Release notes](https://github.com/facebookresearch/ParlAI/releases) to see the latest information about new features & updates, and the website [http://parl.ai](http://parl.ai) for further docs. For an archived list of updates, check out [NEWS.md](https://github.com/facebookresearch/ParlAI/blob/main/NEWS.md).
## Interactive Tutorial For those who want to start with ParlAI now, you can try our [Colab Tutorial](https://colab.research.google.com/drive/1bRMvN0lGXaTF5fuTidgvlAl-Lb41F7AD#scrollTo=KtVz5dCUmFkN). ## Installing ParlAI ### Operating System ParlAI should work as inteded under Linux or macOS. We do not support Windows at this time, but many users [report success on Windows using Python 3.8](https://github.com/facebookresearch/ParlAI/issues/3989) and issues with Python 3.9. We are happy to accept patches that improve Windows support. ### Python Interpreter ParlAI currently requires Python3.8+. ### Requirements ParlAI supports [Pytorch](https://pytorch.org) 1.6 or higher. All requirements of the core modules are listed in [`requirements.txt`](https://github.com/facebookresearch/ParlAI/blob/main/requirements.txt). However, some models included (in [`parlai/agents`](https://github.com/facebookresearch/ParlAI/tree/main/parlai/agents)) have additional requirements. ## Virtual Environment We *strongly* recommend you install ParlAI in a virtual environment using [venv](https://docs.python.org/3/library/venv.html) or [conda](https://www.anaconda.com/). ### End User Installation If you want to use ParlAI without modifications, you can install it with: ```bash cd /path/to/your/parlai-app python3.8 -m venv venv venv/bin/pip install --upgrade pip setuptools wheel venv/bin/pip install parlai ``` ### Developer 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: ```bash git clone https://github.com/facebookresearch/ParlAI.git ~/ParlAI cd ~/ParlAI python3.8 -m venv venv venv/bin/pip install --upgrade pip setuptools wheel venv/bin/python setup.py develop ``` > **Note** > Sometimes the install from source maynot work due to dependencies (specially in PyTorch related packaged). > In that case try building a fresh conda environment and running the similar to the following: > `conda install pytorch==2.0.0 torchvision torchaudio torchtext pytorch-cuda=11.8 -c pytorch -c nvidia`. > Check torch setup documentation for your CUDA and OS versions. 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 - [Quick Start](https://parl.ai/docs/tutorial_quick.html) - [Basics: world, agents, teachers, action and observations](https://parl.ai/docs/tutorial_basic.html) - [Creating a new dataset/task](http://parl.ai/docs/tutorial_task.html) - [List of available tasks/datasets](https://parl.ai/docs/tasks.html) - [Creating a seq2seq agent](https://parl.ai/docs/tutorial_torch_generator_agent.html) - [List of available agents](https://parl.ai/docs/agents_list.html) - [Model zoo (list pretrained models)](https://parl.ai/docs/zoo.html) - [Running crowdsourcing tasks](http://parl.ai/docs/tutorial_crowdsourcing.html) - [Plug into Facebook Messenger](https://parl.ai/docs/tutorial_chat_service.html) ## Examples A large set of scripts can be found in [`parlai/scripts`](https://github.com/facebookresearch/ParlAI/tree/main/parlai/scripts). Here are a few of them. Note: If any of these examples fail, check the [installation section](#installing-parlai) to see if you have missed something. Display 10 random examples from the SQuAD task ```bash parlai display_data -t squad ``` Evaluate an IR baseline model on the validation set of the Personachat task: ```bash 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. ```bash 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**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/core): contains the primary code for the framework - [**agents**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/agents): contains agents which can interact with the different tasks (e.g. machine learning models) - [**scripts**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/scripts): contains a number of useful scripts, like training, evaluating, interactive chatting, ... - [**tasks**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/tasks): contains code for the different tasks available from within ParlAI - [**mturk**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/mturk): contains code for setting up Mechanical Turk, as well as sample MTurk tasks - [**messenger**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/chat_service/services/messenger): contains code for interfacing with Facebook Messenger - [**utils**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/utils): contains a wide number of frequently used utility methods - [**crowdsourcing**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/crowdsourcing): contains code for running crowdsourcing tasks, such as on Amazon Mechanical Turk - [**chat_service**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/chat_service/services/messenger): contains code for interfacing with services such as Facebook Messenger - [**zoo**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/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](https://github.com/facebookresearch/ParlAI/issues). You may also be interested in checking out our [FAQ](https://parl.ai/docs/faq.html) and our [Tips n Tricks](https://parl.ai/docs/tutorial_tipsntricks.html). Please remember to follow our [Code of Conduct](https://github.com/facebookresearch/ParlAI/blob/main/CODE_OF_CONDUCT.md). ## Contributing We welcome PRs from the community! You can find information about contributing to ParlAI in our [Contributing](https://github.com/facebookresearch/ParlAI/blob/main/CONTRIBUTING.md) 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. Kurt Shuster 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](https://arxiv.org/abs/1705.06476) 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](https://github.com/facebookresearch/ParlAI/blob/main/LICENSE)** file for details. %package -n python3-parlai Summary: Unified platform for dialogue research. Provides: python-parlai BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-parlai [ParlAI](http://parl.ai) (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: - **100+ popular datasets available all in one place, with the same API**, among them [PersonaChat](https://arxiv.org/abs/1801.07243), [DailyDialog](https://arxiv.org/abs/1710.03957), [Wizard of Wikipedia](https://openreview.net/forum?id=r1l73iRqKm), [Empathetic Dialogues](https://arxiv.org/abs/1811.00207), [SQuAD](https://rajpurkar.github.io/SQuAD-explorer/), [MS MARCO](http://www.msmarco.org/), [QuAC](https://www.aclweb.org/anthology/D18-1241), [HotpotQA](https://hotpotqa.github.io/), [QACNN & QADailyMail](https://arxiv.org/abs/1506.03340), [CBT](https://arxiv.org/abs/1511.02301), [BookTest](https://arxiv.org/abs/1610.00956), [bAbI Dialogue tasks](https://arxiv.org/abs/1605.07683), [Ubuntu Dialogue](https://arxiv.org/abs/1506.08909), [OpenSubtitles](http://opus.lingfil.uu.se/OpenSubtitles.php), [Image Chat](https://arxiv.org/abs/1811.00945), [VQA](http://visualqa.org/), [VisDial](https://arxiv.org/abs/1611.08669) and [CLEVR](http://cs.stanford.edu/people/jcjohns/clevr/). See the complete list [here](https://github.com/facebookresearch/ParlAI/blob/main/parlai/tasks/task_list.py). - a wide set of [**reference models**](https://parl.ai/docs/agents_list.html) -- from retrieval baselines to Transformers. - a large [zoo of **pretrained models**](https://parl.ai/docs/zoo.html) ready to use off-the-shelf - seamless **integration of [Amazon Mechanical Turk](https://www.mturk.com/mturk/welcome)** for data collection and human evaluation - **integration with [Facebook Messenger](https://parl.ai/docs/tutorial_chat_service.html)** to connect agents with humans in a chat interface - a large range of **helpers to create your own agents** and train on several tasks with **multitasking** - **multimodality**, some tasks use text and images ParlAI is described in the following paper: [“ParlAI: A Dialog Research Software Platform", arXiv:1705.06476](https://arxiv.org/abs/1705.06476) or see these [more up-to-date slides](https://drive.google.com/file/d/1JfUW4AVrjSp8X8Fp0_rTTRoLxUfW0aUm/view?usp=sharing). Follow us on [Twitter](https://twitter.com/parlai_parley) and check out our [Release notes](https://github.com/facebookresearch/ParlAI/releases) to see the latest information about new features & updates, and the website [http://parl.ai](http://parl.ai) for further docs. For an archived list of updates, check out [NEWS.md](https://github.com/facebookresearch/ParlAI/blob/main/NEWS.md). ## Interactive Tutorial For those who want to start with ParlAI now, you can try our [Colab Tutorial](https://colab.research.google.com/drive/1bRMvN0lGXaTF5fuTidgvlAl-Lb41F7AD#scrollTo=KtVz5dCUmFkN). ## Installing ParlAI ### Operating System ParlAI should work as inteded under Linux or macOS. We do not support Windows at this time, but many users [report success on Windows using Python 3.8](https://github.com/facebookresearch/ParlAI/issues/3989) and issues with Python 3.9. We are happy to accept patches that improve Windows support. ### Python Interpreter ParlAI currently requires Python3.8+. ### Requirements ParlAI supports [Pytorch](https://pytorch.org) 1.6 or higher. All requirements of the core modules are listed in [`requirements.txt`](https://github.com/facebookresearch/ParlAI/blob/main/requirements.txt). However, some models included (in [`parlai/agents`](https://github.com/facebookresearch/ParlAI/tree/main/parlai/agents)) have additional requirements. ## Virtual Environment We *strongly* recommend you install ParlAI in a virtual environment using [venv](https://docs.python.org/3/library/venv.html) or [conda](https://www.anaconda.com/). ### End User Installation If you want to use ParlAI without modifications, you can install it with: ```bash cd /path/to/your/parlai-app python3.8 -m venv venv venv/bin/pip install --upgrade pip setuptools wheel venv/bin/pip install parlai ``` ### Developer 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: ```bash git clone https://github.com/facebookresearch/ParlAI.git ~/ParlAI cd ~/ParlAI python3.8 -m venv venv venv/bin/pip install --upgrade pip setuptools wheel venv/bin/python setup.py develop ``` > **Note** > Sometimes the install from source maynot work due to dependencies (specially in PyTorch related packaged). > In that case try building a fresh conda environment and running the similar to the following: > `conda install pytorch==2.0.0 torchvision torchaudio torchtext pytorch-cuda=11.8 -c pytorch -c nvidia`. > Check torch setup documentation for your CUDA and OS versions. 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 - [Quick Start](https://parl.ai/docs/tutorial_quick.html) - [Basics: world, agents, teachers, action and observations](https://parl.ai/docs/tutorial_basic.html) - [Creating a new dataset/task](http://parl.ai/docs/tutorial_task.html) - [List of available tasks/datasets](https://parl.ai/docs/tasks.html) - [Creating a seq2seq agent](https://parl.ai/docs/tutorial_torch_generator_agent.html) - [List of available agents](https://parl.ai/docs/agents_list.html) - [Model zoo (list pretrained models)](https://parl.ai/docs/zoo.html) - [Running crowdsourcing tasks](http://parl.ai/docs/tutorial_crowdsourcing.html) - [Plug into Facebook Messenger](https://parl.ai/docs/tutorial_chat_service.html) ## Examples A large set of scripts can be found in [`parlai/scripts`](https://github.com/facebookresearch/ParlAI/tree/main/parlai/scripts). Here are a few of them. Note: If any of these examples fail, check the [installation section](#installing-parlai) to see if you have missed something. Display 10 random examples from the SQuAD task ```bash parlai display_data -t squad ``` Evaluate an IR baseline model on the validation set of the Personachat task: ```bash 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. ```bash 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**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/core): contains the primary code for the framework - [**agents**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/agents): contains agents which can interact with the different tasks (e.g. machine learning models) - [**scripts**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/scripts): contains a number of useful scripts, like training, evaluating, interactive chatting, ... - [**tasks**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/tasks): contains code for the different tasks available from within ParlAI - [**mturk**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/mturk): contains code for setting up Mechanical Turk, as well as sample MTurk tasks - [**messenger**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/chat_service/services/messenger): contains code for interfacing with Facebook Messenger - [**utils**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/utils): contains a wide number of frequently used utility methods - [**crowdsourcing**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/crowdsourcing): contains code for running crowdsourcing tasks, such as on Amazon Mechanical Turk - [**chat_service**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/chat_service/services/messenger): contains code for interfacing with services such as Facebook Messenger - [**zoo**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/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](https://github.com/facebookresearch/ParlAI/issues). You may also be interested in checking out our [FAQ](https://parl.ai/docs/faq.html) and our [Tips n Tricks](https://parl.ai/docs/tutorial_tipsntricks.html). Please remember to follow our [Code of Conduct](https://github.com/facebookresearch/ParlAI/blob/main/CODE_OF_CONDUCT.md). ## Contributing We welcome PRs from the community! You can find information about contributing to ParlAI in our [Contributing](https://github.com/facebookresearch/ParlAI/blob/main/CONTRIBUTING.md) 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. Kurt Shuster 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](https://arxiv.org/abs/1705.06476) 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](https://github.com/facebookresearch/ParlAI/blob/main/LICENSE)** file for details. %package help Summary: Development documents and examples for parlai Provides: python3-parlai-doc %description help [ParlAI](http://parl.ai) (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: - **100+ popular datasets available all in one place, with the same API**, among them [PersonaChat](https://arxiv.org/abs/1801.07243), [DailyDialog](https://arxiv.org/abs/1710.03957), [Wizard of Wikipedia](https://openreview.net/forum?id=r1l73iRqKm), [Empathetic Dialogues](https://arxiv.org/abs/1811.00207), [SQuAD](https://rajpurkar.github.io/SQuAD-explorer/), [MS MARCO](http://www.msmarco.org/), [QuAC](https://www.aclweb.org/anthology/D18-1241), [HotpotQA](https://hotpotqa.github.io/), [QACNN & QADailyMail](https://arxiv.org/abs/1506.03340), [CBT](https://arxiv.org/abs/1511.02301), [BookTest](https://arxiv.org/abs/1610.00956), [bAbI Dialogue tasks](https://arxiv.org/abs/1605.07683), [Ubuntu Dialogue](https://arxiv.org/abs/1506.08909), [OpenSubtitles](http://opus.lingfil.uu.se/OpenSubtitles.php), [Image Chat](https://arxiv.org/abs/1811.00945), [VQA](http://visualqa.org/), [VisDial](https://arxiv.org/abs/1611.08669) and [CLEVR](http://cs.stanford.edu/people/jcjohns/clevr/). See the complete list [here](https://github.com/facebookresearch/ParlAI/blob/main/parlai/tasks/task_list.py). - a wide set of [**reference models**](https://parl.ai/docs/agents_list.html) -- from retrieval baselines to Transformers. - a large [zoo of **pretrained models**](https://parl.ai/docs/zoo.html) ready to use off-the-shelf - seamless **integration of [Amazon Mechanical Turk](https://www.mturk.com/mturk/welcome)** for data collection and human evaluation - **integration with [Facebook Messenger](https://parl.ai/docs/tutorial_chat_service.html)** to connect agents with humans in a chat interface - a large range of **helpers to create your own agents** and train on several tasks with **multitasking** - **multimodality**, some tasks use text and images ParlAI is described in the following paper: [“ParlAI: A Dialog Research Software Platform", arXiv:1705.06476](https://arxiv.org/abs/1705.06476) or see these [more up-to-date slides](https://drive.google.com/file/d/1JfUW4AVrjSp8X8Fp0_rTTRoLxUfW0aUm/view?usp=sharing). Follow us on [Twitter](https://twitter.com/parlai_parley) and check out our [Release notes](https://github.com/facebookresearch/ParlAI/releases) to see the latest information about new features & updates, and the website [http://parl.ai](http://parl.ai) for further docs. For an archived list of updates, check out [NEWS.md](https://github.com/facebookresearch/ParlAI/blob/main/NEWS.md). ## Interactive Tutorial For those who want to start with ParlAI now, you can try our [Colab Tutorial](https://colab.research.google.com/drive/1bRMvN0lGXaTF5fuTidgvlAl-Lb41F7AD#scrollTo=KtVz5dCUmFkN). ## Installing ParlAI ### Operating System ParlAI should work as inteded under Linux or macOS. We do not support Windows at this time, but many users [report success on Windows using Python 3.8](https://github.com/facebookresearch/ParlAI/issues/3989) and issues with Python 3.9. We are happy to accept patches that improve Windows support. ### Python Interpreter ParlAI currently requires Python3.8+. ### Requirements ParlAI supports [Pytorch](https://pytorch.org) 1.6 or higher. All requirements of the core modules are listed in [`requirements.txt`](https://github.com/facebookresearch/ParlAI/blob/main/requirements.txt). However, some models included (in [`parlai/agents`](https://github.com/facebookresearch/ParlAI/tree/main/parlai/agents)) have additional requirements. ## Virtual Environment We *strongly* recommend you install ParlAI in a virtual environment using [venv](https://docs.python.org/3/library/venv.html) or [conda](https://www.anaconda.com/). ### End User Installation If you want to use ParlAI without modifications, you can install it with: ```bash cd /path/to/your/parlai-app python3.8 -m venv venv venv/bin/pip install --upgrade pip setuptools wheel venv/bin/pip install parlai ``` ### Developer 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: ```bash git clone https://github.com/facebookresearch/ParlAI.git ~/ParlAI cd ~/ParlAI python3.8 -m venv venv venv/bin/pip install --upgrade pip setuptools wheel venv/bin/python setup.py develop ``` > **Note** > Sometimes the install from source maynot work due to dependencies (specially in PyTorch related packaged). > In that case try building a fresh conda environment and running the similar to the following: > `conda install pytorch==2.0.0 torchvision torchaudio torchtext pytorch-cuda=11.8 -c pytorch -c nvidia`. > Check torch setup documentation for your CUDA and OS versions. 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 - [Quick Start](https://parl.ai/docs/tutorial_quick.html) - [Basics: world, agents, teachers, action and observations](https://parl.ai/docs/tutorial_basic.html) - [Creating a new dataset/task](http://parl.ai/docs/tutorial_task.html) - [List of available tasks/datasets](https://parl.ai/docs/tasks.html) - [Creating a seq2seq agent](https://parl.ai/docs/tutorial_torch_generator_agent.html) - [List of available agents](https://parl.ai/docs/agents_list.html) - [Model zoo (list pretrained models)](https://parl.ai/docs/zoo.html) - [Running crowdsourcing tasks](http://parl.ai/docs/tutorial_crowdsourcing.html) - [Plug into Facebook Messenger](https://parl.ai/docs/tutorial_chat_service.html) ## Examples A large set of scripts can be found in [`parlai/scripts`](https://github.com/facebookresearch/ParlAI/tree/main/parlai/scripts). Here are a few of them. Note: If any of these examples fail, check the [installation section](#installing-parlai) to see if you have missed something. Display 10 random examples from the SQuAD task ```bash parlai display_data -t squad ``` Evaluate an IR baseline model on the validation set of the Personachat task: ```bash 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. ```bash 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**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/core): contains the primary code for the framework - [**agents**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/agents): contains agents which can interact with the different tasks (e.g. machine learning models) - [**scripts**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/scripts): contains a number of useful scripts, like training, evaluating, interactive chatting, ... - [**tasks**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/tasks): contains code for the different tasks available from within ParlAI - [**mturk**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/mturk): contains code for setting up Mechanical Turk, as well as sample MTurk tasks - [**messenger**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/chat_service/services/messenger): contains code for interfacing with Facebook Messenger - [**utils**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/utils): contains a wide number of frequently used utility methods - [**crowdsourcing**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/crowdsourcing): contains code for running crowdsourcing tasks, such as on Amazon Mechanical Turk - [**chat_service**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/chat_service/services/messenger): contains code for interfacing with services such as Facebook Messenger - [**zoo**](https://github.com/facebookresearch/ParlAI/tree/main/parlai/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](https://github.com/facebookresearch/ParlAI/issues). You may also be interested in checking out our [FAQ](https://parl.ai/docs/faq.html) and our [Tips n Tricks](https://parl.ai/docs/tutorial_tipsntricks.html). Please remember to follow our [Code of Conduct](https://github.com/facebookresearch/ParlAI/blob/main/CODE_OF_CONDUCT.md). ## Contributing We welcome PRs from the community! You can find information about contributing to ParlAI in our [Contributing](https://github.com/facebookresearch/ParlAI/blob/main/CONTRIBUTING.md) 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. Kurt Shuster 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](https://arxiv.org/abs/1705.06476) 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](https://github.com/facebookresearch/ParlAI/blob/main/LICENSE)** file for details. %prep %autosetup -n parlai-1.7.2 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-parlai -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Thu Jun 08 2023 Python_Bot