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
null
ParlAI-main/parlai/crowdsourcing/tasks/model_chat/analysis/compile_results.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 os from datetime import datetime from typing import Any, Dict import numpy as np import pandas as pd from parla...
18,886
41.538288
144
py
null
ParlAI-main/parlai/crowdsourcing/tasks/model_chat/hydra_configs/conf/example.yaml
#@package _global_ defaults: - /mephisto/blueprint: model_chat_blueprint - /mephisto/architect: local - /mephisto/provider: mock mephisto: blueprint: annotations_config_path: ${task_dir}/task_config/annotations_config.json onboarding_qualification: model_chat_onboarding block_qualification: model_ch...
1,170
36.774194
128
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/model_chat/hydra_configs/conf/example_image_chat.yaml
#@package _global_ defaults: - /mephisto/blueprint: model_image_chat_blueprint - /mephisto/architect: local - /mephisto/provider: mock mephisto: blueprint: annotations_config_path: "" block_qualification: model_image_chat_block chat_data_folder: ${task_dir}/model_chat/ model_opt_path: ${task_dir...
912
32.814815
128
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/model_chat/scripts/__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/crowdsourcing/tasks/model_chat/scripts/save_image_contexts.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. """ Save a pickle of images and associated contexts for the model image chat task. """ import os import pickle from par...
2,901
31.977273
87
py
null
ParlAI-main/parlai/crowdsourcing/tasks/model_chat/task_config/image_model_opts.yaml
transresnet_multimodal: > --model-file models:image_chat/transresnet_multimodal/model --image-mode resnet152
117
28.5
63
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/model_chat/task_config/left_pane_text.html
<br> <br> <b><h4>Task Description</h4></b> <br> Dummy Left Pane Task Description. Lorem ipsum.
95
12.714286
33
html
null
ParlAI-main/parlai/crowdsourcing/tasks/model_chat/task_config/model_opts.yaml
blender_90M: > --model-file zoo:blender/blender_90M/model
61
30
46
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/model_chat/task_config/task_description.html
<br> <b><h4>Task Description</h4></b> <br> Dummy Task Description. Lorem ipsum. <br><br>
89
11.857143
32
html
null
ParlAI-main/parlai/crowdsourcing/tasks/multi_model_chat/README.md
# Multi-party model chat An extension of the model chat that runs between the human crowdworker and mutliple model-controlled agents. ```.sh # assuming you are in multi_model_chat directory python -m parlai.crowdsourcing.tasks.model_chat.run \ --config-path "$(eval pwd)/hydra_configs" conf=multiparty task_dir="$(eval p...
840
55.066667
228
md
null
ParlAI-main/parlai/crowdsourcing/tasks/multi_model_chat/__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/crowdsourcing/tasks/multi_model_chat/agents.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 typing import Optional, Dict import random from parlai.core.agents import Agent from parlai.core.opt import Opt fro...
11,970
36.177019
135
py
null
ParlAI-main/parlai/crowdsourcing/tasks/multi_model_chat/compile_results.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 numpy as np import pandas as pd from parlai.crowdsourcing.tasks.model_chat.analysis.compile_results import ( ...
13,709
41.84375
129
py
null
ParlAI-main/parlai/crowdsourcing/tasks/multi_model_chat/multiparty_worlds.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 os import numpy as np import random import time from parlai.core.message import Message from parlai....
13,554
38.634503
136
py
null
ParlAI-main/parlai/crowdsourcing/tasks/multi_model_chat/frontend/components/styles.css
.location { background-color: rgb(232, 147, 147); padding: 10px; border-radius: 5px; } .persona { padding: 10px; margin-top: 10px; border-radius: 5px; } .player { background-color: azure; } .npc { background-color: bisque; } .rating-response { background-color: rgb(216 81 30); ...
336
12.48
41
css
null
ParlAI-main/parlai/crowdsourcing/tasks/multi_model_chat/hydra_configs/conf/multiparty.yaml
#@package _global_ monitoring_log_rate: 300 defaults: - /mephisto/blueprint: model_chat_blueprint - /mephisto/architect: local - /mephisto/provider: mock mephisto: blueprint: task_description_file: ${task_dir}/task_config/task_description.html onboard_task_data_path: ${task_dir}/task_config/onboard_task...
1,689
41.25
128
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/multi_model_chat/task_config/model_opts.yaml
random_light_prod: > --model parlai.crowdsourcing.tasks.multi_model_chat.agents:MultipartyModelChatAgent --decision-agent parlai.crowdsourcing.tasks.multi_model_chat.agents:RandomSpeakerDecicionsAgent --speech-model-file zoo:light_whoami/profile_expanded_attention_128/model --context-format light
314
51.5
99
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/multi_model_chat/task_config/task_description.html
<h3>What is this task?</h3> <p> In this task you will have a conversation with two other characters in a fantasy game setting. The other two characters are controlled by Artificial Intelligence (AI). You will all be given characters and a description of the setting of the conversation. </p> <h4>Chat</h4> <p> ...
2,034
39.7
125
html
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/README.md
# Per-turn Evaluation Crowdsourcing Task Code to run human crowdworker evaluations on a pair of conversational models, one of the types of evaluation techniques explored in [Smith, et al. "Human Evaluation of Conversations is an Open Problem: comparing the sensitivity of various methods for evaluating dialogue agents" ...
6,426
89.521127
560
md
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/__init__.py
0
0
0
py
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/bot_agent.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.crowdsourcing.tasks.model_chat.bot_agent import TurkLikeAgent from parlai.core.message import Message from p...
1,840
37.354167
88
py
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/impl.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 os import random from mephisto.operations.operator import Operator from mephisto.tools.scripts import load_db_an...
2,036
32.95
88
py
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/per_turn_eval_blueprint.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 os import yaml from dataclasses import dataclass, field from typing import Dict, TYPE_CHECKING from mephisto.abs...
7,337
36.248731
91
py
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/run.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 os from dataclasses import dataclass, field from typing import Any, List import hydra from mephisto.operations.h...
1,529
25.842105
94
py
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/worlds.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 random import parlai.utils.logging as logging from typing import Any, Dict, Optional from parlai.core.agents imp...
22,952
38.102215
129
py
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/analysis/__init__.py
0
0
0
py
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/analysis/compile_results.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 os import re from collections import defaultdict from datetime import datetime from typing import Any, Dict impo...
24,077
42.383784
93
py
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/hydra_configs/conf/example_model_comparison.yaml
#@package _global_ defaults: - /mephisto/blueprint: per_turn_eval_blueprint - /mephisto/architect: local - /mephisto/provider: mock mephisto: blueprint: annotations_config_path: ${task_dir}/task_config/annotations_config.json onboarding_qualification: per_turn_eval_onboarding__engaging block_qualifi...
1,849
56.8125
189
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/task_config/left_pane_text.html
<b><h2>Chat with a conversation partner and choose which response is better!</h2></b> <br> <h6> In this task you will have a conversation and play the part of a given character. For example, your given character could be: "I am an accountant. I like to go on bike rides." Throughout the conversation, feel free to chat w...
1,128
50.318182
409
html
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/task_config/model_opts.yaml
blender_90M: > --model-file zoo:blender/blender_90M/model --beam-block-full-context False --beam-block-ngram 3 --beam-context-block-ngram 3 --beam-min-length 20 --beam-size 10 --inference beam blender_3B: > --model-file zoo:blender/blender_3B/model --beam-block-full-context False ...
1,076
26.615385
88
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/pairwise_per_turn_eval/task_config/task_description.html
<br> <b><h4>Task Description</h4></b> <br> Dummy Task Description. Lorem ipsum. <br><br>
88
13.833333
32
html
null
ParlAI-main/parlai/crowdsourcing/tasks/qa_data_collection/README.md
# QA data collection task Mephisto task to have crowdsource workers read a passage and then write a question-and-answer pair about that passage. For instance, if the passage is as follows: > At the time, there were many varying opinions about Christian doctrine, and no centralized way of enforcing orthodoxy. Constant...
1,801
111.625
412
md
null
ParlAI-main/parlai/crowdsourcing/tasks/qa_data_collection/__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/crowdsourcing/tasks/qa_data_collection/run.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 os from dataclasses import dataclass, field from typing import List, Any import hydra from omegaconf import Dict...
2,699
29.681818
94
py
null
ParlAI-main/parlai/crowdsourcing/tasks/qa_data_collection/util.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 itertools import chain from parlai.agents.repeat_label.repeat_label import RepeatLabelAgent from parlai.core.param...
779
30.2
83
py
null
ParlAI-main/parlai/crowdsourcing/tasks/qa_data_collection/worlds.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.crowdsourcing.utils.worlds import CrowdTaskWorld from parlai.core.worlds import validate class QADataColle...
2,355
29.205128
88
py
null
ParlAI-main/parlai/crowdsourcing/tasks/qa_data_collection/hydra_configs/conf/example.yaml
#@package _global_ defaults: - /mephisto/blueprint: parlai_chat - /mephisto/architect: local - /mephisto/provider: mock mephisto: blueprint: world_file: ${task_dir}/worlds.py task_description_file: ${task_dir}/task_config/task_description.html custom_source_bundle: ${task_dir}/webapp/build/bundle.js...
866
32.346154
128
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/qa_data_collection/task_config/task_description.html
<h1>If you see this, it means the task description has loaded successfully</h1> <br /> <h3>What is this task?</h3> <p> In this task, you'll provide a question and the corresponding answer from the passage provided. </p> <br /><br /> <h3>Task Description Information!</h3> <p> Task descriptions can take arbitrary HTM...
685
56.166667
401
html
null
ParlAI-main/parlai/crowdsourcing/tasks/qa_data_collection/webapp/src/static/index.html
<!-- Copyright 2017-present, Facebook, Inc. All rights reserved. This source code is licensed under the license found in the LICENSE file in the root directory of this source tree. --> <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1...
882
25.757576
89
html
null
ParlAI-main/parlai/crowdsourcing/tasks/turn_annotations_static/README.md
# Turn Annotations Static Task This task renders conversations from a file and asks for turn-by-turn annotations of them. This is in contrast to the crowdsourcing task `parlai.crowdsourcing.tasks.model_chat`, which collects turn-by-turn annotations from a live human/model conversation. Two variants of the blueprint ar...
2,590
102.64
423
md
null
ParlAI-main/parlai/crowdsourcing/tasks/turn_annotations_static/__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/crowdsourcing/tasks/turn_annotations_static/run.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 os from dataclasses import dataclass, field from typing import Any, List import hydra from mephisto.operations.h...
1,505
25.892857
94
py
null
ParlAI-main/parlai/crowdsourcing/tasks/turn_annotations_static/turn_annotations_blueprint.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 logging import math import os import random from dataclasses import dataclass, field from typing impo...
17,918
41.462085
137
py
null
ParlAI-main/parlai/crowdsourcing/tasks/turn_annotations_static/analysis/__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/crowdsourcing/tasks/turn_annotations_static/analysis/compile_results.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 copy import json import os from datetime import datetime from typing import Any, Dict, Optional, Tuple import nu...
24,682
42.379613
407
py
null
ParlAI-main/parlai/crowdsourcing/tasks/turn_annotations_static/hydra_configs/conf/example.yaml
#@package _global_ defaults: - /mephisto/blueprint: turn_annotations_static_blueprint - /mephisto/architect: local - /mephisto/provider: mock mephisto: blueprint: subtasks_per_unit: 6 task_source: ${task_dir}/webapp/build/bundle.js data_jsonl: FIXME_TASK_DATA_PATH extra_source_dir: ${task_dir}/w...
1,033
35.928571
128
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/turn_annotations_static/hydra_configs/conf/example_in_flight_qa.yaml
#@package _global_ defaults: - /mephisto/blueprint: turn_annotations_static_inflight_qa_blueprint - /mephisto/architect: local - /mephisto/provider: mock mephisto: blueprint: subtasks_per_unit: 6 task_source: ${task_dir}/webapp/build/bundle.js data_jsonl: FIXME_TASK_DATA_PATH extra_source_dir: $...
1,008
30.53125
128
yaml
null
ParlAI-main/parlai/crowdsourcing/tasks/turn_annotations_static/task_config/task_description.html
<br> <b><h4>Task Description</h4></b> <br> Dummy Task Description. Lorem ipsum. turnannotations <br><br>
105
12.25
32
html
null
ParlAI-main/parlai/crowdsourcing/tasks/turn_annotations_static/webapp/src/css/style.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. */
186
30.166667
66
css
null
ParlAI-main/parlai/crowdsourcing/tasks/turn_annotations_static/webapp/src/static/index.html
<!-- Copyright 2017-present, Facebook, Inc. All rights reserved. This source code is licensed under the license found in the LICENSE file in the root directory of this source tree. --> <!DOCTYPE html> <html style="margin: 0;padding: 0;height: 100%;"> <head> <meta charset="utf-8" /> <meta name="viewport" conten...
978
29.59375
114
html
null
ParlAI-main/parlai/crowdsourcing/utils/README.md
# Crowdsourcing utilities ## Overview - `acceptability.py`: Used to ensure that a worker's messages throughout a conversation meet certain criteria (not too short, not all caps, not a lot of repetition, safety, etc.). More details about the acceptability checker can be found in the `acceptability.AcceptabilityChecker`...
3,846
53.957143
296
md
null
ParlAI-main/parlai/crowdsourcing/utils/__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/crowdsourcing/utils/acceptability.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 re from typing import Iterable, List from parlai.utils.safety import OffensiveStringMatcher class Acceptabilit...
5,080
32.649007
87
py
null
ParlAI-main/parlai/crowdsourcing/utils/analysis.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 __future__ import annotations import argparse import os from abc import ABC, abstractmethod from datetime import d...
8,802
35.987395
127
py
null
ParlAI-main/parlai/crowdsourcing/utils/frontend.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. """ Utilities relating to frontend code. """ import os import shutil import subprocess def build_task(task_directory: ...
1,217
28
71
py
null
ParlAI-main/parlai/crowdsourcing/utils/mturk.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 time import random from dataclasses import dataclass, field from typing import Optional from mephisto.abstractio...
4,024
31.723577
129
py
null
ParlAI-main/parlai/crowdsourcing/utils/tests.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. """ Utilities for running tests. """ import os import random import tempfile import time import unittest from typing imp...
17,594
35.964286
130
py
null
ParlAI-main/parlai/crowdsourcing/utils/worlds.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.worlds import World class CrowdDataWorld(World): def prep_save_data(self, workers): """ ...
3,648
29.408333
88
py
null
ParlAI-main/parlai/mturk/README.md
The code in `parlai/mturk/` has been deprecated. All code for running crowdsourcing tasks can now be found in [`parlai/crowdsourcing/`](https://github.com/facebookresearch/ParlAI/tree/main/parlai/crowdsourcing), and all crowdsourcing tasks now utilize the [Mephisto](https://github.com/facebookresearch/Mephisto) platfor...
5,094
28.970588
351
md
null
ParlAI-main/parlai/mutators/__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/mutators/context_shuffle.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 random from parlai.core.opt import Opt from parlai.core.message import Message from parlai.core.mutators import r...
1,001
29.363636
88
py
null
ParlAI-main/parlai/mutators/episode_reverse.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 random from typing import List, Optional from parlai.core.opt import Opt from parlai.core.message import Message ...
1,842
31.910714
88
py
null
ParlAI-main/parlai/mutators/episode_shuffle.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 random from typing import List, Optional from parlai.core.opt import Opt from parlai.core.message import Message ...
1,836
31.803571
88
py
null
ParlAI-main/parlai/mutators/flatten.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 random from typing import List from parlai.core.message import Message from parlai.core.mutators import ManyEpiso...
935
31.275862
87
py
null
ParlAI-main/parlai/mutators/flip_labels.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 typing import Optional from parlai.core.message import Message from parlai.core.mutators import MessageMutator, re...
5,493
35.626667
105
py
null
ParlAI-main/parlai/mutators/last_turn.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 typing import List, Iterator, Optional from parlai.core.opt import Opt from parlai.core.params import ParlaiParser ...
1,518
34.325581
88
py
null
ParlAI-main/parlai/mutators/word_reverse.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 random from parlai.core.opt import Opt from parlai.core.message import Message from parlai.core.mutators import r...
1,172
31.583333
88
py
null
ParlAI-main/parlai/mutators/word_shuffle.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 random from parlai.core.opt import Opt from parlai.core.message import Message from parlai.core.mutators import r...
1,167
31.444444
88
py
null
ParlAI-main/parlai/nn/__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/nn/checkpoint.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. try: from fairscale.nn import checkpoint_wrapper except ImportError: def checkpoint_wrapper(module): ""...
547
27.842105
75
py
null
ParlAI-main/parlai/nn/lr_scheduler.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. """ Code for LR Schedulers. See ParlAILRScheduler (super class) and subclasses for detailed documentation """ import ma...
17,643
34.934827
89
py
null
ParlAI-main/parlai/ops/__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/ops/ngram_repeat_block.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # Copyright (c) Microsoft Corporation. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # Code adapted from https://github.com/microsoft/fastseq/blob/main/fastseq/ops/ngr...
2,603
29.27907
101
py
null
ParlAI-main/parlai/opt_presets/README.md
# Option Aliases This folder contains a set of "option aliases" that are automatically packaged and provided with ParlAI. They are used as shorthand for ## Adding option aliases Simply adding `.opt` file to this folder is enough to add an alias. The directory structure is respected, so `parlai/options/myfolder/myali...
800
39.05
80
md
null
ParlAI-main/parlai/opt_presets/__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/opt_presets/docs.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. """ List of all opt presets distributed with ParlAI. This file is for automatically generating docs. """ # PRESET_DESC...
2,133
35.169492
81
py
null
ParlAI-main/parlai/scripts/__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/scripts/build_candidates.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. """ Build the candidate responses for a retrieval model. ## Examples ```bash parlai build_candidates --task convai2 --o...
3,237
29.261682
82
py
null
ParlAI-main/parlai/scripts/build_dict.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. """ Generates a dictionary file from the training data. ## Examples ```bash # learn the vocabulary from one task, then ...
5,014
30.540881
87
py
null
ParlAI-main/parlai/scripts/compare_opts.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 argparse import json from parlai.core.opt import Opt def compare_opts(opt_path_1: str, opt_path_2: str, load_r...
3,049
32.888889
86
py
null
ParlAI-main/parlai/scripts/convert_data_to_json_format.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. """ Converts data used in a task to json format. (Same as "Conversation" class; ie, for use in ACUTE-eval) Specify the t...
954
29.806452
88
py
null
ParlAI-main/parlai/scripts/convert_data_to_parlai_format.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. """ Convert a dataset into the ParlAI text format. ## Examples ```shell parlai convert_data_to_parlai_format --task bab...
3,245
28.779817
85
py
null
ParlAI-main/parlai/scripts/convo_render.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 os import json import random import tempfile import subprocess from parlai.core.params import ParlaiParser from p...
10,549
28.224377
117
py
null
ParlAI-main/parlai/scripts/data_stats.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. """ Count and display statistics of the data. ## Examples ```shell parlai data_stats --task convai2 ``` """ from parlai...
5,963
31.413043
87
py
null
ParlAI-main/parlai/scripts/detect_offensive_language.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. """ Basic example which iterates through the tasks specified and checks them for offensive language. ## Examples ```she...
4,517
32.716418
86
py
null
ParlAI-main/parlai/scripts/display_data.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. """ Basic example which iterates through the tasks specified and prints them out. Used for verification of data loading a...
3,923
30.392
115
py
null
ParlAI-main/parlai/scripts/display_model.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. """ Basic example which iterates through the tasks specified and runs the given model on them. ## Examples ```shell par...
2,968
29.927083
115
py
null
ParlAI-main/parlai/scripts/distributed_eval.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. """ Distributed evaluation script. NOT MEANT TO BE CALLED DIRECTLY BY USER. This script is meant to be in conjunction w...
1,776
28.131148
82
py
null
ParlAI-main/parlai/scripts/distributed_tod_world_script.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. """ Distributed script for running TOD model-model chats. Not to be called directly; should be called from SLURM """ fr...
972
29.40625
86
py
null
ParlAI-main/parlai/scripts/distributed_train.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. """ Distributed training script. NOT MEANT TO BE CALLED DIRECTLY BY USER. This script is meant to be in conjunction wit...
1,782
27.758065
82
py
null
ParlAI-main/parlai/scripts/eval_model.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. """ Basic example which iterates through the tasks specified and evaluates the given model on them. ## Examples ```she...
9,884
29.987461
86
py
null
ParlAI-main/parlai/scripts/eval_wordstat.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 helper script can be used alone with modelfile and task: the output will contain the word statistics of the mode...
9,590
32.186851
97
py
null
ParlAI-main/parlai/scripts/extract_image_feature.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. """ Basic example which iterates through the tasks specified and load/extract the image features. For more options, che...
2,038
25.480519
83
py
null
ParlAI-main/parlai/scripts/flask.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. """ Example Flask server which hosts a model. ## Examples **Serving the model** ```shell parlai flask -m repeat_query p...
1,360
24.203704
98
py
null
ParlAI-main/parlai/scripts/generate_model_card.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. """ Script to generate the model card automatically. """ from datetime import date, datetime from parlai.core.metrics im...
60,325
35.494858
456
py
null
ParlAI-main/parlai/scripts/interactive.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. """ Basic script which allows local human keyboard input to talk to a trained model. ## Examples ```shell parlai intera...
3,911
30.548387
115
py
null
ParlAI-main/parlai/scripts/interactive_web.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. """ Talk with a model using a web UI. ## Examples ```shell parlai interactive_web --model-file "zoo:tutorial_transforme...
10,378
33.029508
139
py
null
ParlAI-main/parlai/scripts/multiprocessing_eval.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. """ Main launch script for single-host, multi-GPU evaluation. This is a drop-in replacement for [eval_model]. This scr...
2,994
29.252525
113
py
null
ParlAI-main/parlai/scripts/multiprocessing_train.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. """ Main launch script for single-host, multi-GPU training. This is a drop-in replacement for [train_model]. This scri...
3,465
29.403509
109
py
null
ParlAI-main/parlai/scripts/party.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. """ Throw a party. ## Examples ```shell parlai party ``` """ import sys import time from parlai.core.script import Pa...
10,248
33.860544
88
py