Search is not available for this dataset
repo
stringlengths
2
152
⌀
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
tb3py
tb3py-master/setup.py
#!/usr/bin/python3 import os import sys import subprocess # import requests import glob import os from setuptools import setup, find_packages base_dir = os.path.dirname(__file__) with open(os.path.join(base_dir, "README.md")) as f: long_d = f.read() def precompile(julia=None): """Precompile Julia""" p...
3,636
26.976923
206
py
tb3py
tb3py-master/.github/workflows/main.yml
name: tb3py-action on: [push, pull_request] jobs: build: runs-on: ubuntu-latest strategy: matrix: python-version: [3.8] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${...
1,366
30.790698
149
yml
tb3py
tb3py-master/tb3py/__init__.py
"""Version number.""" __version__ = "2021.11.11"
49
15.666667
26
py
tb3py
tb3py-master/tb3py/main.py
"""Module to run tb3py.""" import sys import os import numpy as np from julia.api import Julia from jarvis.core.kpoints import Kpoints3D as Kpoints # from jarvis.core.kpoints import generate_kgrid import matplotlib.pyplot as plt from jarvis.db.figshare import get_jid_data from jarvis.core.atoms import Atoms import a...
7,914
29.678295
166
py
tb3py
tb3py-master/tb3py/pred.py
"""Predict properties of a db.""" from jarvis.db.figshare import data from jarvis.db.jsonutils import dumpjson from sklearn.metrics import mean_absolute_error import matplotlib.pyplot as plt from jarvis.core.atoms import Atoms from tb3py.main import get_energy plt.switch_backend("agg") def predict_for_db( datas...
2,251
27.506329
64
py
tb3py
tb3py-master/tb3py/Bandgaps/gap_auto_multi.py
"""Module for vacancy formation energy.""" # from jarvis.analysis.defects.vacancy import Vacancy from jarvis.db.jsonutils import dumpjson from jarvis.core.atoms import Atoms from jarvis.db.figshare import data from tb3py.main import get_energy # from jarvis.analysis.thermodynamics.energetics import get_optb88vdw_ener...
2,321
20.109091
76
py
tb3py
tb3py-master/tb3py/Surf/surf_auto_multi.py
# from jarvis.analysis.defects.vacancy import Vacancy from jarvis.db.jsonutils import dumpjson from jarvis.core.atoms import Atoms from jarvis.db.figshare import get_jid_data, data from tb3py.main import get_energy # from jarvis.analysis.thermodynamics.energetics import get_optb88vdw_energy from jarvis.analysis.structu...
4,740
21.258216
79
py
tb3py
tb3py-master/tb3py/Surf/surf_auto_multiv1.py
from jarvis.db.jsonutils import dumpjson from jarvis.core.atoms import Atoms from jarvis.db.figshare import get_jid_data, data from tb3py.main import get_energy # from jarvis.analysis.thermodynamics.energetics import get_optb88vdw_energy from jarvis.analysis.structure.spacegroup import ( Spacegroup3D, symmetric...
5,236
22.59009
174
py
tb3py
tb3py-master/tb3py/Vacancy/chempot_maker1.py
"""Module for making chemical potentials.""" # from jarvis.analysis.defects.vacancy import Vacancy from jarvis.db.jsonutils import dumpjson from jarvis.core.atoms import Atoms from jarvis.db.figshare import data from tb3py.main import get_energy from collections import defaultdict # from jarvis.analysis.thermodynamic...
4,792
18.019841
76
py
tb3py
tb3py-master/tb3py/Vacancy/defects_comparison.py
"""Compare vacancy and surface energy plots.""" import matplotlib.pyplot as plt from matplotlib.gridspec import GridSpec import pandas as pd plt.switch_backend("agg") df = pd.read_csv("defects_comparison.csv") V_DFT = df["V_DFT"].dropna().values V_TB = df["V_TB"].dropna().values Gamma_DFT = df["Gamma_DFT"].dropna().v...
1,001
21.772727
47
py
tb3py
tb3py-master/tb3py/Vacancy/vac_auto_multi.py
from jarvis.analysis.defects.vacancy import Vacancy from jarvis.db.jsonutils import loadjson, dumpjson from jarvis.core.atoms import Atoms from jarvis.db.figshare import data from tb3py.main import get_energy # from jarvis.analysis.thermodynamics.energetics import get_optb88vdw_energy dat = data("dft_3d") # x = get_...
4,865
22.061611
76
py
tb3py
tb3py-master/tb3py/Vacancy/vac_auto_multiv1.py
from jarvis.analysis.defects.vacancy import Vacancy from jarvis.db.jsonutils import loadjson, dumpjson from jarvis.core.atoms import Atoms from jarvis.db.figshare import data from tb3py.main import get_energy # from jarvis.analysis.thermodynamics.energetics import get_optb88vdw_energy dat = data("dft_3d") # x = get_...
4,747
22.50495
76
py
tb3py
tb3py-master/tb3py/examples/example_using_julia_functions_directly.py
import tb3py.main as tb3 import numpy as np #this example shows how to use the julia commands directly in python. #it is also possible to access some of these commands with a more pythonic #interface using functions defined in main.py #make crystal object from POSCAR #c = tb3.TB.makecrys("POSCAR") c = tb3.TB.makecr...
846
23.2
74
py
tb3py
tb3py-master/tb3py/tests/__init__.py
0
0
0
py
tb3py
tb3py-master/tb3py/tests/test_ptop.py
from tb3py.main import example, get_energy_bandstructure def test_example(): energy, tbc, flag = example() print(energy) assert round(energy, 5) == round(-0.43160184930052803, 5) def test_jarvis_dat(): from jarvis.db.figshare import get_jid_data from jarvis.core.atoms import Atoms atoms = A...
468
21.333333
64
py
null
ParlAI-main/.pre-commit-config.yaml
repos: - repo: https://github.com/psf/black rev: 22.3.0 hooks: - id: black language_version: python3 - repo: local hooks: - id: git-secrets language: script entry: .github/scripts/git-secrets --pre_commit_hook name: git-secrets require_serial: true
317
21.714286
60
yaml
null
ParlAI-main/CODE_OF_CONDUCT.md
# Code of Conduct ## Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender i...
3,355
42.584416
87
md
null
ParlAI-main/CONTRIBUTING.md
# Contributing to ParlAI While we are seeding this project with an initial set of popular tasks and a few models and examples, ongoing contributions from the research community are desired to increase the pool of tasks, models, and baselines. ## Pull Requests We actively welcome your pull requests. 1. Fork the repo...
3,038
42.414286
157
md
null
ParlAI-main/NEWS.md
## News **Archive Information** We are now making most of our major announcements on [Twitter](https://twitter.com/parlai_parley) and in our [Release Notes](https://github.com/facebookresearch/ParlAI/releases). ### Older news 2020-07-21: We have added a new `parlai` super command, complete with [autocompletion](http...
10,628
86.122951
911
md
null
ParlAI-main/README.md
<p align="center"> <img width="70%" src="docs/source/\_static/img/parlai.png" /> </p> <p align="center"> <a href="https://github.com/facebookresearch/ParlAI/blob/main/LICENSE"> <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="CircleCI" /> </a> <a href="https://pypi.org/project/parlai/"> ...
11,675
56.80198
1,098
md
null
ParlAI-main/autoformat.sh
#!/bin/bash # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # exit on errors set -e # configuration options for our doc formatting DOCOPTS="--pre-summary-newline --wrap-descriptions 88 --wra...
4,824
25.222826
112
sh
null
ParlAI-main/codecov.yml
coverage: status: project: off patch: off changes: off ignore: - parlai/tasks/*/build.py
105
12.25
27
yml
null
ParlAI-main/conftest.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ This is used to configure markers on tests based on filename. We use this to split up tests into different circlec...
4,125
31.746032
87
py
null
ParlAI-main/setup.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import sys from setuptools import setup, find_packages VERSION = '1.7.2' # if you update, update parlai/__init__.py ...
1,660
30.942308
86
py
null
ParlAI-main/.circleci/config.yml
version: 2.1 # ------------------------------------------------------------------------------------- # environments where we run our jobs # ------------------------------------------------------------------------------------- executors: standard_cpu39: docker: - image: cimg/python:3.9.16 environment: ...
15,467
32.051282
228
yml
null
ParlAI-main/.github/pull_request_template.md
**Patch description** <!--Please enter a clear and concise description of what your pull request does, and why it is necessary. If your patch fixes an issue, please reference that issue here. --> **Testing steps** <!-- Enter steps to test your pull request. Give a clear and concise description of what you expected to ...
586
47.916667
97
md
null
ParlAI-main/.github/ISSUE_TEMPLATE/agent-bug.md
--- name: "[Agent Bug]" about: Reporting problems or unexpected behavior with an Agent or pretrained model. --- **Bug description** Please enter a clear and concise description of what the bug is. **Reproduction steps** Enter steps to reproduce the behavior. **Expected behavior** Give a clear and concise descriptio...
556
21.28
103
md
null
ParlAI-main/.github/ISSUE_TEMPLATE/feature-request.md
--- name: "[Feature Request]" about: Suggest an idea for this project --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you wa...
564
30.388889
92
md
null
ParlAI-main/.github/ISSUE_TEMPLATE/mturk-bug.md
--- name: "[MTurk]" about: Reporting problems or unexpected behavior with MTurk --- **Bug description** Please enter a clear and concise description of what the bug is. **Reproduction steps** Enter steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected be...
1,173
29.894737
82
md
null
ParlAI-main/.github/ISSUE_TEMPLATE/other.md
--- name: "[Other]" about: For anything else you want an issue for --- Use this to open other questions or issues, and provide context here.
143
17
69
md
null
ParlAI-main/.github/workflows/lint.yml
name: Lint on: push: branches: - main pull_request: jobs: pre-commit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 - uses: pre-commit/action@v2.0.0 lint: runs-on: ubuntu-latest steps: - name: Setup Python uses: act...
5,552
32.859756
130
yml
null
ParlAI-main/.github/workflows/stale.yml
name: Mark stale issues and pull requests on: schedule: - cron: "0 0 * * *" permissions: contents: read jobs: stale: permissions: issues: write # for actions/stale to close stale issues pull-requests: write # for actions/stale to close stale PRs runs-on: ubuntu-latest steps: - us...
903
33.769231
194
yml
null
ParlAI-main/docs/README.md
# Updating the documentation First, if you haven't already, run: ```bash cd ~/ParlAI; python setup.py develop ``` Then use make to build the html: ``` make html ``` NOTE: Autodocs imports many agents, so you may run into `ImportError`s when running `make`. Just `pip install` as needed to continue. Then, make any ch...
702
40.352941
185
md
null
ParlAI-main/docs/sample_model_cards/blenderbot_90M/model_card.md
# Blender 90M 90M-parameter generative model finetuned on blended_skill_talk tasks. - Developed by Facebook AI Research using [ParlAI](https://parl.ai/) - Model started training on February 10, 2007. - Type of model: Transformer Generative Model ### Quick Usage ``` python parlai/scripts/safe_interactive.py -m...
10,399
41.975207
547
md
null
ParlAI-main/docs/sample_model_cards/safety_multi/model_card.md
# BERT Classifier Multi-turn Dialogue Safety Model Classifier trained on the multi-turn adversarial safety task in addition to both the single-turn standard and adversarial safety tasks and Wikipedia Toxic Comments. - Developed by Facebook AI Research using [ParlAI](https://parl.ai/) - Model started training on Se...
6,475
29.985646
252
md
null
ParlAI-main/docs/source/agents_list.md
# Standard Agents ParlAI comes with a wide variety of standardized agents. Some of these are common baselines made available for quicker research; some can be made state-of-the-art with careful tuning and experimentation. Each of these contains a README with examples of usage and description of the agent. ```{toctree...
385
24.733333
80
md
null
ParlAI-main/docs/source/chat_service.md
# parlai.chat_service ParlAI's chat service functionality. ## Chat Service Core ### parlai.chat_service.core.agents ```{eval-rst} .. automodule:: parlai.chat_service.core.agents :members: ``` ### parlai.chat_service.core.core.chat_service_manager ```{eval-rst} .. automodule:: parlai.chat_service.core.chat_servic...
3,113
20.776224
75
md
null
ParlAI-main/docs/source/cli_advanced.md
# Advanced Scripts These are the more obscure and advanced scripts in parlai. ```{include} cli_advanced.inc ```
114
15.428571
58
md
null
ParlAI-main/docs/source/cli_custom.md
# Writing Your Own Script Author: Kurt Shuster ## Custom ParlAI Script If you have accustomed yourself with the `parlai` command and would like to write your own ParlAI-based script, this tutorial is meant for you. Writing and using a script today in ParlAI is a smooth experience, thanks to recent work in standardiz...
3,210
32.447917
324
md
null
ParlAI-main/docs/source/cli_usage.md
# Command Line Usage This contains the command line usage for each of the standard scripts we release. These are each included in `parlai/scripts`, and all may be invoked with the "parlai" supercommand. The parlai supercommand may be invoked from the command line by running `parlai` after installing ParlAI. Its defau...
1,166
28.923077
84
md
null
ParlAI-main/docs/source/conf.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # # ParlAI documentation build configuration file, created by # sphinx-quickstart on Wed Apr 19 ...
6,624
30.25
109
py
null
ParlAI-main/docs/source/core.md
# parlai.core This contains the full, comprehensive docstrings of all of `parlai.core`, which powers the vast majority of ParlAI. ```{toctree} :maxdepth: 1 :glob: core/* ```
177
13.833333
73
md
null
ParlAI-main/docs/source/faq.md
# Frequently Asked Questions This document contains a number of questions that are regularly asked on GitHub Issues. ## Why is my model not generating a response? For a generative model, check that `--skip-generation` is set to `False`. ## Why can't I reproduce the results of an evaluation on a task with a pretrain...
1,953
38.877551
88
md
null
ParlAI-main/docs/source/generate_agent_list.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.abs import parlai.core.agents import parlai.agents from parlai.core.params import ParlaiParser import argparse import os ...
5,144
33.3
88
py
null
ParlAI-main/docs/source/generate_cli.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import importlib import inspect import argparse import parlai.core.script as pcs def render_script(fout, key, registra...
3,507
32.730769
86
py
null
ParlAI-main/docs/source/generate_metric_list.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.core.metrics import METRICS_DISPLAY_DATA fout = open('metric_list.inc', 'w') fout.write('| Metric | Expla...
509
27.333333
65
py
null
ParlAI-main/docs/source/generate_mutator_list.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import textwrap import argparse from parlai.core.params import ParlaiParser from parlai.core.mutators import setup_mutato...
4,213
35.643478
88
py
null
ParlAI-main/docs/source/generate_opt_presets.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import json import pkg_resources from parlai.opt_presets.docs import PRESET_DESCRIPTIONS fout = open('opt_presets_list...
1,047
36.428571
82
py
null
ParlAI-main/docs/source/generate_task_READMEs.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.tasks.task_list import task_list import os tasks = {} for task_dict in task_list: id = task_dict.get('i...
1,443
29.723404
69
py
null
ParlAI-main/docs/source/generate_task_list.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.tasks.task_list import task_list MAIN = "https://github.com/facebookresearch/ParlAI/tree/main" categories =...
2,277
33.515152
74
py
null
ParlAI-main/docs/source/generate_zoo_list.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.zoo.model_list import model_list category_zoo_list = {} for model_dict in model_list: task = model_dict...
2,262
28.38961
82
py
null
ParlAI-main/docs/source/index.md
# ParlAI Documentation ParlAI is a one-stop-shop for dialog research. ```{toctree} :maxdepth: 1 :caption: Tutorials & Explanations tutorial_quick tutorial_basic tutorial_task tutorial_worlds tutorial_torch_generator_agent tutorial_torch_ranker_agent tutorial_metrics tutorial_fast tutorial_mutators tutorial_crowdsour...
796
11.854839
46
md
null
ParlAI-main/docs/source/mutators.md
# Mutators List of ParlAI mutators. Mutators are teacher-independent transformations, and are useful for writing transformations you want to apply to multiple datasets. Mutators are available any time teachers are used, i.e. when there is a `--task` argument. Mutators may also be stacked, e.g. `--mutators flatten,wor...
500
32.4
80
md
null
ParlAI-main/docs/source/opt_presets.md
# Opt Presets Opt presets are a way to provide multiple options on the command line as shorthand. Opt presets are bundled with ParlAI and may be used by simply invoking the `-o preset_name` option within any ParlAI command. You may also define your own options by placing them in `~/.parlai/opt_presets/`. For example,...
727
27
81
md
null
ParlAI-main/docs/source/tasks.md
# Tasks List of ParlAI tasks defined in the file [task_list.py](https://github.com/facebookresearch/ParlAI/tree/main/parlai/tasks/task_list.py). ```{include} task_list.inc ```
179
21.5
136
md
null
ParlAI-main/docs/source/tutorial_basic.md
Intro to ParlAI =============== __Authors__: Alexander Holden Miller, Margaret Li, Jason Weston What is ParlAI? --------------- ParlAI is a python-based platform for enabling dialog AI research. Its goal is to provide researchers: - a unified framework for sharing, training and testing dialog models - many pop...
16,039
36.652582
158
md
null
ParlAI-main/docs/source/tutorial_chat_service.md
# Using Chat Services This is a tutorial for connecting your trained ParlAI agents to various chat services in order to allow your models to talk to humans. Humans using chat services (like Facebook Messenger) can be viewed as another type of agent in ParlAI and communicate in the standard observation/act dict format....
12,200
58.228155
402
md
null
ParlAI-main/docs/source/tutorial_crowdsourcing.md
Running crowdsourcing tasks ===================== __Authors__: Jack Urbanek, Emily Dinan, Will Feng, Eric Smith :::{warning} ParlAI's MTurk functionality has expanded out of this project to become [Mephisto](https://github.com/facebookresearch/Mephisto), and the ParlAI crowdsourcing code has moved from `parlai.mturk` ...
17,078
64.436782
652
md
null
ParlAI-main/docs/source/tutorial_docker.md
ParlAI Docker image ================== **Authors**: Mojtaba Komeili We offer a Docker image that provides a ready to use environment for ParlAI. This image comes with pre-installed ParlAI, along with some extra packages often required for using it. You can find it under Packages in our main Github repository ([link](...
4,618
53.341176
183
md
null
ParlAI-main/docs/source/tutorial_fast.md
# Speeding up training Author: Stephen Roller This tutorial walks you through a few ways to massively speed up your training runs in ParlAI. These tricks tend to work best with generative models, but some can also be used with others. :::{warning} Retuning-hyperparameters Many of these options are effectively tricks...
9,767
47.356436
85
md
null
ParlAI-main/docs/source/tutorial_metrics.md
# Understanding and adding metrics Author: Stephen Roller ## Introduction and Standard Metrics :::{tip} List of metrics If you're not sure what a metric means, refer to our [List of metrics](#list-of-metrics). ::: ParlAI contains a number of built-in metrics that are automatically computed when we train and evaluat...
18,697
43.308057
151
md
null
ParlAI-main/docs/source/tutorial_model_cards.md
# Generating Model Cards **Author**: Wendy Zhang ## What is a model card? Think of model cards as a condensed medical card for models. It is a great way for people who might not have the time to read a paper in detail to get the gist of what a model is doing, the datasets involved, how it is performing, and any con...
9,448
49.801075
400
md
null
ParlAI-main/docs/source/tutorial_mutators.md
# Mutators **Author**: Stephen Roller Mutators are task-independent data transformations, which are applicable to _any_ dataset. Examples of mutators include: - Reversing all the turns in a conversation - Down-sampling the dataset - Shuffling the words in a turn - and much more Mutators are particularly useful when...
4,447
34.870968
172
md
null
ParlAI-main/docs/source/tutorial_quick.md
ParlAI Quick-start ================== **Authors**: Alexander Holden Miller, Margaret Li Colab Tutorial -------------- As an alternative to this quick start tutorial, you may also consider our [Google Colab tutorial](https://colab.research.google.com/drive/1bRMvN0lGXaTF5fuTidgvlAl-Lb41F7AD#scrollTo=KtVz5dCUmFkN), whi...
6,375
30.254902
199
md
null
ParlAI-main/docs/source/tutorial_swap_components.md
# Swapping Out Transformer Subcomponents __Author__: Spencer Poff Sometimes you find yourself wanting to experiment with an architecture that looks a lot like another, but with one component modified. If that component is buried deep within the model, this is not easily accomplished with subclassing without copying a...
2,388
36.328125
299
md
null
ParlAI-main/docs/source/tutorial_task.md
# Tasks and Datasets in ParlAI __Authors__: Alexander Holden Miller, Filipe de Avila Belbute Peres, Jason Weston, Emily Dinan ParlAI can support fixed dialogue data for supervised learning (which we call a dataset) or even dynamic tasks involving an environment, agents and possibly rewards (we refer to the general ca...
25,438
39.964573
306
md
null
ParlAI-main/docs/source/tutorial_tests.md
# Tests in ParlAI Author: Kurt Shuster ## Running a Test To run tests in ParlAI, we use [pytest](https://docs.pytest.org/en/stable/). The following commands are taken from the `tests` directory [README](https://github.com/facebookresearch/ParlAI/tree/main/tests). *To run all tests in your current directory, simply ...
16,592
52.01278
875
md
null
ParlAI-main/docs/source/tutorial_tipsntricks.md
Tips and Tricks =============== Here we list other miscellaneous useful tips of things you can do in ParlAI not listed elsewhere. Command line tool ----------------- ParlAI comes with a "super" command, that has all the other commands built in: ```bash $ parlai help ParlAI - Dialogue Research Platform usage: parlai...
8,285
45.033333
414
md
null
ParlAI-main/docs/source/tutorial_torch_generator_agent.md
# Using Torch Generator Agent **Authors**: Eric Smith `parlai.core.torch_generator_agent.TorchGeneratorAgent` is an abstract parent class that provides functionality for building autoregressive generative models. Extending `TorchGeneratorAgent` requires your model conform to a strict interface, but then provides you ...
7,558
47.146497
670
md
null
ParlAI-main/docs/source/tutorial_torch_ranker_agent.md
Using Torch Ranker Agent ======================== __Authors__: Emily Dinan TorchRankerAgent is an abstract parent class for PyTorch models that rank possible responses from a set of possible candidates. It inherits from TorchAgent and contains boilerplate code for training and evaluating ranking models. Example Mode...
4,788
31.80137
186
md
null
ParlAI-main/docs/source/tutorial_worlds.md
Worlds, Sharing & Batching ========================== __Authors__: Alexander Holden Miller, Kurt Shuster, Stephen Roller :::{important} Before you begin If you are unfamiliar with the basics of displaying data or calling train or evaluate on a model, please first see the [getting started](tutorial_basic) section. If ...
16,531
41.718346
285
md
null
ParlAI-main/docs/source/utils.md
# parlai.utils ParlAI has very many utilities, roughly organized by function. ## parlai.utils.bpe ```{eval-rst} .. automodule:: parlai.utils.bpe :members: ``` ## parlai.utils.conversations ```{eval-rst} .. automodule:: parlai.utils.conversations :members: ``` ## parlai.utils.data ```{eval-rst} .. automodule...
1,393
12.533981
62
md
null
ParlAI-main/docs/source/zoo.md
Model Zoo ========= This is a list of pretrained ParlAI models. They are listed by task, or else in a pretraining section (at the end) when meant to be used as initialization for fine-tuning on a task. ```{include} zoo_list.inc ``` Pretrained Word Embeddings -------------------------- Some models support using Pret...
1,315
30.333333
142
md
null
ParlAI-main/docs/source/_static/css/parlai_theme.css
/* Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ body { font-family: "Lato","proxima-nova","Helvetica Neue",Arial,sans-serif; } /* Default header fonts are ugly */ h1, h2, .rst-content .to...
3,168
18.090361
84
css
null
ParlAI-main/docs/source/core/agents.md
# parlai.core.agents ```{eval-rst} .. automodule:: parlai.core.agents :members: ```
86
13.5
34
md
null
ParlAI-main/docs/source/core/build_data.md
# parlai.core.build_data ```{eval-rst} .. automodule:: parlai.core.build_data :members: ```
94
14.833333
38
md
null
ParlAI-main/docs/source/core/dict.md
# parlai.core.dict ```{eval-rst} .. automodule:: parlai.core.dict :members: ```
82
12.833333
32
md
null
ParlAI-main/docs/source/core/loader.md
# parlai.core.loader ```{eval-rst} .. automodule:: parlai.core.loader :members: ```
86
13.5
34
md
null
ParlAI-main/docs/source/core/messages.md
# parlai.core.message ```{eval-rst} .. automodule:: parlai.core.message :members: ``` <img src="/docs/_static/img/act-obs-dict.png" width="60%"/> The primary medium for information flow (messages between agents and the environment) in ParlAI is a Message, a subclass of a python `dict` containing the actions of an a...
8,653
33.616
121
md
null
ParlAI-main/docs/source/core/metrics_api.md
# parlai.core.metrics ```{eval-rst} .. automodule:: parlai.core.metrics :members: ```
88
13.833333
35
md
null
ParlAI-main/docs/source/core/mutators.md
# parlai.core.mutators ```{eval-rst} .. automodule:: parlai.core.mutators :members: ```
90
14.166667
36
md
null
ParlAI-main/docs/source/core/params.md
# parlai.core.opt ```{eval-rst} .. automodule:: parlai.core.opt :members: ``` # parlai.core.params ```{eval-rst} .. automodule:: parlai.core.params :members: ```
167
13
34
md
null
ParlAI-main/docs/source/core/script.md
# parlai.core.script ```{eval-rst} .. automodule:: parlai.core.script :members: ```
86
13.5
34
md
null
ParlAI-main/docs/source/core/teachers.md
# parlai.core.teachers ```{eval-rst} .. automodule:: parlai.core.teachers :members: ```
90
14.166667
36
md
null
ParlAI-main/docs/source/core/torch_agent.md
# parlai.core.torch_agent Torch Agent implements much of the boilerplate necessary for creating a neural dialogue agent, so you can focus on modeling. Torch Agent limits its functionality to maintaining dialogue history, transforming text into vectors of indices, and loading/saving models. The user is required to impl...
1,352
27.1875
80
md
null
ParlAI-main/docs/source/core/worlds.md
# parlai.core.worlds ```{eval-rst} .. automodule:: parlai.core.worlds :members: ```
86
13.5
34
md
null
ParlAI-main/example_parlai_internal/README.md
# Internal subfolder By creating an internal subfolder, you can set up your own custom agents and tasks, create your own model zoo, and manage it all with a separate git repository. We've set it up so you can now work inside the ParlAI folder without the risk of accidentally pushing your work to the public ParlAI repo...
2,734
40.439394
138
md
null
ParlAI-main/example_parlai_internal/__init__.py
0
0
0
py
null
ParlAI-main/example_parlai_internal/agents/parrot/parrot.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.core.torch_agent import TorchAgent, Output class ParrotAgent(TorchAgent): def train_step(self, batch): ...
640
29.52381
73
py
null
ParlAI-main/parlai/README.md
ParlAI 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 examples of different loops (building dictionary, train/eval, displaying data) - **tas...
749
61.5
104
md
null
ParlAI-main/parlai/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. __version__ = '1.7.2'
222
26.875
65
py
null
ParlAI-main/parlai/__main__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from parlai.core.script import superscript_main def main(): # indirect call so that console_entry (see setup.py) d...
547
27.842105
79
py
null
ParlAI-main/parlai/agents/README.md
# Agents This directory contains a variety of different agents which use ParlAI's interface. ## Utility - **local_human**: receives human input from the terminal. used for interactive mode, e.g. `parlai/scripts/interactive.py`. - **legacy_agents**: contains deprecated agent code for posterity - **random_candidate**:...
1,385
45.2
126
md
null
ParlAI-main/parlai/agents/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
199
32.333333
65
py
null
ParlAI-main/parlai/agents/alice/README.md
# ALICE Bot This is an agent that takes an observation, gets the ALICE bot's response the observation, and wraps it into an action's reply. The ALICE bot is a strong rule-based bot uing AIML. The Python implementation of the bot was taken from https://github.com/paulovn/python-aiml. https://www.pandorabots.com/pandora/...
555
41.769231
127
md
null
ParlAI-main/parlai/agents/alice/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
198
38.8
65
py
null
ParlAI-main/parlai/agents/alice/alice.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Agent uses the Free ALICE AIML interpreter to generate replies to observations. More information can be found at: ht...
2,114
24.792683
79
py
null
ParlAI-main/parlai/agents/bart/README.md
# BART BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension See https://arxiv.org/abs/1910.13461. The BART agent can be instantiated as simply `-m bart`, however it is recommended to specify `--init-model zoo:bart/bart_large/model` or `-mf zoo:bart/bart_la...
847
29.285714
210
md
null
ParlAI-main/parlai/agents/bart/__init__.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree.
198
38.8
65
py
null
ParlAI-main/parlai/agents/bart/bart.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension Se...
6,036
31.283422
79
py