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/core/loader.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.
"""
Functions for loading modules for agents, tasks and teachers, worlds, and scripts.
These functions are largely for c... | 14,111 | 32.126761 | 94 | py |
null | ParlAI-main/parlai/core/logs.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.
"""
Log metrics to tensorboard.
This file provides interface to log any metrics in tensorboard, could be
extended to any... | 14,471 | 31.375839 | 148 | py |
null | ParlAI-main/parlai/core/message.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.
"""
File for Message object and associated functions.
The Message object's key function is to prevent users from editing... | 1,883 | 27.984615 | 86 | py |
null | ParlAI-main/parlai/core/metrics.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.
"""
Provides standard metric evaluations for dialog, as well as an aggregator.
"""
from __future__ import annotations
i... | 35,793 | 31.188849 | 133 | py |
null | ParlAI-main/parlai/core/mutators.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 abc
import importlib
import pkgutil
from typing import Optional, Iterable, T... | 8,263 | 29.72119 | 88 | py |
null | ParlAI-main/parlai/core/opt.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.
"""
Opt is the system for passing around options throughout ParlAI.
"""
from __future__ import annotations
import copy... | 6,204 | 31.150259 | 97 | py |
null | ParlAI-main/parlai/core/params.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.
"""
Provide an argument parser and default command line options for using ParlAI.
"""
import argparse
import importlib
i... | 49,959 | 34.457771 | 94 | py |
null | ParlAI-main/parlai/core/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.
"""
The general ParlAI Script interface.
An abstract class to help standardize the call to ParlAI scripts, enabling th... | 10,294 | 30.19697 | 87 | py |
null | ParlAI-main/parlai/core/teachers.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 module provides a set of teachers that deal with dialog.
``FixedDialogTeacher(Teacher)``
Base class for... | 99,556 | 36.106597 | 122 | py |
null | ParlAI-main/parlai/core/torch_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.
"""
General utility code for building PyTorch-based agents in ParlAI.
Contains the following main utilities:
* TorchAge... | 91,762 | 37.060141 | 110 | py |
null | ParlAI-main/parlai/core/torch_classifier_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.
"""
Torch Classifier Agents classify text into a fixed set of labels.
"""
from parlai.core.params import ParlaiParser
... | 26,840 | 35.222672 | 171 | py |
null | ParlAI-main/parlai/core/torch_generator_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.
"""
Generic PyTorch-based Generator agent.
Implements quite a bit of boilerplate, including forced-decoding loss and a... | 77,741 | 35.430178 | 118 | py |
null | ParlAI-main/parlai/core/torch_image_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.
"""
Subclass of TorchAgent used for handling image features.
"""
from typing import Optional
from parlai.core.params imp... | 3,581 | 30.421053 | 78 | py |
null | ParlAI-main/parlai/core/torch_ranker_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.
"""
Torch Ranker Agents provide functionality for building ranking models.
See the TorchRankerAgent tutorial for exampl... | 43,701 | 39.957826 | 91 | py |
null | ParlAI-main/parlai/core/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.
"""
Worlds are the basic environments which define how agents interact with one another.
``World(object)`` provides ... | 48,703 | 32.199727 | 137 | py |
null | ParlAI-main/parlai/core/tod/README.md | # Task-Oriented Dialog (TOD) Core README
For the quickest getting-to-use of TOD classes, start with the "Teachers + Agents Usage" section below (for understanding how to setup agents such that they work with new datasets) and `parlai/scripts/tod_world_script.py` (for understanding how to run simulations with the TOD c... | 5,479 | 63.470588 | 345 | md |
null | ParlAI-main/parlai/core/tod/__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/core/tod/teacher_metrics.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.
"""
Task Oriented Dialogue (TOD) teacher metrics.
"""
from typing import Optional, List, Dict, Any
from parlai.core.metr... | 4,994 | 32.979592 | 88 | py |
null | ParlAI-main/parlai/core/tod/tod_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.
"""
Agents (used for dumping data) and Teachers (for training models) related to the TOD
conversation setup.
As a conven... | 32,362 | 38.227879 | 408 | py |
null | ParlAI-main/parlai/core/tod/tod_core.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.
"""
Task Oriented Dialogue (TOD) enums and base classes.
This file defines standard tokens, classes for round and conve... | 8,951 | 33.96875 | 202 | py |
null | ParlAI-main/parlai/core/tod/tod_world.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.
"""
Class for running task-oriented dialogue chats.
Specifically this class handles:
1. Setting up and running the diffe... | 13,188 | 41.003185 | 284 | py |
null | ParlAI-main/parlai/core/tod/world_metrics.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.
"""
Wrapper object holding metrics for TODWorld.
This class is in its own file to prevent circular dependencies + monoli... | 4,584 | 39.219298 | 161 | py |
null | ParlAI-main/parlai/core/tod/world_metrics_handlers.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.
"""
Metrics handlers - ie, objects that handle generations from Tod World and calculates metrics from them.
Note that on... | 6,448 | 35.435028 | 256 | py |
null | ParlAI-main/parlai/core/tod/tod_test_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/core/tod/tod_test_utils/test_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.
"""
Helpers so we don't need to create agents all over.
"""
import parlai.core.tod.tod_agents as tod_agents
import parl... | 6,573 | 28.612613 | 87 | py |
null | ParlAI-main/parlai/crowdsourcing/README.md | # Crowdsourcing tasks
Code for crowdsourcing tasks that use Mephisto. See the [Mephisto quick start guide](https://mephisto.ai/docs/guides/quickstart/) to quickly get started with Mephisto. **Please install Mephisto via poetry to avoid depdency conflits with ParlAI.**
```
# install poetry
$ curl -sSL https://raw.githu... | 4,804 | 77.770492 | 761 | md |
null | ParlAI-main/parlai/crowdsourcing/__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/projects/humaneval/single_model_eval/README.md | # Crowdsourcing task for single-model per-turn and per-dialogue evaluations
Code to run human crowdworker evaluations on a single model, 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 evaluatin... | 3,278 | 80.975 | 341 | md |
null | ParlAI-main/parlai/crowdsourcing/projects/humaneval/single_model_eval/__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/projects/humaneval/single_model_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,549 | 27.703704 | 94 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/humaneval/single_model_eval/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/projects/humaneval/single_model_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
from collections import defaultdict
from datetime import datetime
from typing import Any, Dict
import pandas ... | 15,056 | 43.155425 | 127 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/humaneval/single_model_eval/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: single_model_eval__onboarding
block_qualification: ... | 1,879 | 43.761905 | 128 | yaml |
null | ParlAI-main/parlai/crowdsourcing/projects/humaneval/single_model_eval/task_config/left_pane_text.html | <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 with your conversation partner however you’d like and however feels natural.
</h6>
<h6>
Aft... | 585 | 35.625 | 299 | html |
null | ParlAI-main/parlai/crowdsourcing/projects/humaneval/single_model_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
... | 896 | 23.916667 | 46 | yaml |
null | ParlAI-main/parlai/crowdsourcing/projects/humaneval/single_model_eval/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/projects/multisession_chat/human_eval/__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/projects/multisession_chat/human_eval/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 json
import os
import re
from typing import Any, Dict
import numpy as np
import pandas as pd
from parlai.crowdso... | 20,971 | 44.492408 | 144 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/multisession_chat/human_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,973 | 28.029412 | 149 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/multisession_chat/human_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 time
from typing import Any, Dict, List, Tuple
from parlai.core.worlds import validate
from parlai.crowdsourcing... | 6,259 | 34.977011 | 128 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/multisession_chat/human_eval/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
world_file: ${task_dir}/worlds.py
custom_source_dir: ${task_dir}/frontend
... | 1,712 | 37.931818 | 184 | yaml |
null | ParlAI-main/parlai/crowdsourcing/projects/multisession_chat/human_eval/task_config/model_opts.yaml | BST90M: >
--model-file zoo:blender/blender_90M/model
| 57 | 18.333333 | 46 | yaml |
null | ParlAI-main/parlai/crowdsourcing/projects/multisession_chat/human_eval/task_config/task_description.html | <p>
<b>Main Task Instrution:</b>
<br>
Please chitchat with another worker for 5 to 6 turns each in a world <b>WITHOUT COVID</b>, as if you were <b>catching up</b> since last time you two spoke.
<span style="color:blue"> The OPENING of this chitchat FOLLOWs UP on an engaging topic mentioned last time.
... | 11,565 | 49.72807 | 262 | html |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/README.md | # Wizard of Internet
This is the crowdsourcing task from the Internet-Augmented Dialogue Generation paper ([link](https://arxiv.org/abs/2107.07566)).
It uses [Mephisto](https://github.com/facebookresearch/Mephisto) platform to collect dialogue data using human workers on Amazon Mechanical Turk.
## How to use
Having s... | 2,133 | 87.916667 | 473 | md |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/__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/projects/wizard_of_internet/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 numpy as np
from typing import Iterable, List
from nltk.stem import PorterStemmer
from parlai.crowdsourcing.utils.... | 7,896 | 32.320675 | 86 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/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.
"""
Compiles the final dataset (a json file) from the this Mephisto crowdsourcing task.
Example use:
python compil... | 5,965 | 31.075269 | 102 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/constants.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.
# Possible roles of an agent during task
NO_ROLE = 0
WIZARD = 1
APPRENTICE = 2
IN_TRAINING = 10
WIZARD_IN_TRAINING = WIZ... | 12,242 | 38.493548 | 111 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/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 random
import os
from collections import defaultdict
import hydra
from omegaconf import DictConfig
from dataclass... | 11,214 | 34.945513 | 89 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/task_description.html | <h1>Description</h1>
In this task, you will have a conversation with another person.
You both see a character descriptions that we randomly assign to one of you;
that person will assume that personality for the duration of this chat.
The other person has access to internet search and can use that to find
information ab... | 2,411 | 40.586207 | 98 | html |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/wizard_internet_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.
from dataclasses import dataclass, field
from mephisto.operations.registry import register_mephisto_abstraction
from mep... | 6,533 | 32.336735 | 108 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/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 copy import deepcopy
import random
import time
from datetime import datetime
from typing import Any, Dict, List, Uni... | 51,244 | 35.682176 | 102 | py |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/hydra_configs/conf/dev.yaml |
#@package _global_
defaults:
- /mephisto/blueprint: wizard_internet_parlaichat_blueprint
- /mephisto/architect: local
- /mephisto/provider: mock
mephisto:
blueprint:
onboarding_qualification: wizard-onboarding-dev
block_qualification: wizard-block-dev
role_qualification: wizard-role-trained-dev
... | 1,609 | 34 | 70 | yaml |
null | ParlAI-main/parlai/crowdsourcing/projects/wizard_of_internet/webapp/components/styles.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.
*/
#ui-container {
display: contents;
}
.side-pane {
width: 55%;
}
#info-bar {
display: flex;
flex-direction: row;
}
... | 2,025 | 16.617391 | 66 | css |
null | ParlAI-main/parlai/crowdsourcing/tasks/__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/acute_eval/README.md | # ACUTE-Eval
## Paper information
Margaret Li, Jason Weston, Stephen Roller.
_[ACUTE-EVAL: Improved Dialogue Evaluation with Optimized Questions and Multi-turn Comparisons](https://arxiv.org/abs/1909.03087)_.
## Citation
If you use this evaluation method in your own work, please cite with the
following BibTex entry... | 13,640 | 62.446512 | 567 | md |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/__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/acute_eval/acute_eval_agent_state.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, Dict, Any
from mephisto.abstractions.blueprints.abstract.static_task.static_agent_state import ... | 1,103 | 31.470588 | 86 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/acute_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 math
from dataclasses import dataclass, field
from typing import ClassVar, List, Type, Any, Dict, Itera... | 6,689 | 39.301205 | 100 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/acute_eval_builder.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 mephisto.abstractions.blueprint import TaskBuilder
import os
import shutil
import subprocess
class AcuteEvalBuil... | 2,890 | 35.1375 | 84 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/acute_eval_runner.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 queue
import random
from typing import List, Any, Dict, Tuple, Set, TYPE_CHECKING
from mephisto.util... | 17,630 | 37.664474 | 88 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/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.
"""
ACUTE-Eval Analyzer.
FOR ANALYSIS!!
"""
import hashlib
import json
import os
from copy import deepcopy
from datetim... | 31,320 | 35.71864 | 143 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/dump_task_to_acute_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 ParlAI teacher to acute-eval format.
Examples
--------
.. code-block:: shell
python parlai/crowdsourcing/ta... | 4,189 | 29.143885 | 88 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/fast_acute_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.
from dataclasses import dataclass, field
from typing import Optional
from mephisto.operations.registry import register_... | 3,265 | 31.66 | 109 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/fast_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.
"""
Execute a Fast ACUTE run.
"""
import datetime
import json
import os
import random
import time
from dataclasses impor... | 21,588 | 35.041736 | 135 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_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.
from dataclasses import dataclass, field
from typing import Any, List
import hydra
from mephisto.operations.hydra_confi... | 2,314 | 32.550725 | 108 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/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.
import hashlib
import os
from typing import Iterable, List, Optional, Tuple, Union
import pandas as pd
from pytest_regr... | 7,419 | 34.165877 | 100 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/hydra_configs/conf/base_fast_acute.yaml | #@package _global_
defaults:
- /mephisto/blueprint: fast_acute
- /mephisto/architect: local
- /mephisto/provider: mock
mephisto:
task:
allowed_concurrent: 1
assignment_duration_in_seconds: 600
max_num_concurrent_units: 0 # 0 means infinite; set this to a positive integer to limit concurrent HITs an... | 674 | 38.705882 | 129 | yaml |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/hydra_configs/conf/example.yaml | #@package _global_
defaults:
- /mephisto/blueprint: acute_eval
- /mephisto/architect: local
- /mephisto/provider: mock
mephisto:
blueprint:
additional_task_description: ""
annotations_per_pair: 1
block_on_onboarding_fail: true
block_qualification: acute_eval_${current_time}_block
eval_questi... | 1,267 | 37.424242 | 129 | yaml |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/hydra_configs/conf/example_fast_acute.yaml | #@package _global_
defaults:
- base_fast_acute
mephisto:
blueprint:
acute_eval_type: engaging
config_path: ${task_dir}/task_config/model_config_self_chat.json
models: model1,model2
num_self_chats: 5
root_dir: ${task_dir}/task_config
task: blended_skill_talk
randomize_conversations: True
| 320 | 23.692308 | 68 | yaml |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/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.
*/
.rt-th:focus {
outline: none !important;
}
| 231 | 22.2 | 66 | css |
null | ParlAI-main/parlai/crowdsourcing/tasks/acute_eval/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... | 862 | 29.821429 | 212 | html |
null | ParlAI-main/parlai/crowdsourcing/tasks/chat_demo/README.md | # ParlAI chat task
Chat task using two ParlAI-style agents. Code can be extended to change the number of human agents or to add bot agents. See the Mephisto [README](https://github.com/facebookresearch/Mephisto/blob/main/examples/parlai_chat_task_demo/README.md) for more details, and see the [`model_chat/`](https://gi... | 1,153 | 143.25 | 447 | md |
null | ParlAI-main/parlai/crowdsourcing/tasks/chat_demo/__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/chat_demo/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
import hydra
from omegaconf import DictConfig, MISSING
# From the M... | 2,474 | 29.9375 | 94 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/README.md | # DialCrowd
DialCrowd is a dialogue crowdsourcing toolkit that helps requesters write clear HITs, view and analyze results, and obtain higher-quality data. This integration allows for the requester interface, worker interface, and analysis interface to be integrated into ParlAI so requesters can have access to ParlAI's... | 8,304 | 46.729885 | 412 | md |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/__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/dialcrowd/config.sh | #!/bin/bash
# /*********************************************
# @ Jessica Huynh, Ting-Rui Chiang, Kyusong Lee
# Carnegie Mellon University 2022
# *********************************************/
cd ./webapp-config/
npm install
npm run dev
node server.js
| 254 | 22.181818 | 48 | sh |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/configquality.sh | #!/bin/bash
# /*********************************************
# @ Jessica Huynh, Ting-Rui Chiang, Kyusong Lee
# Carnegie Mellon University 2022
# *********************************************/
cd ./webapp-results/
npm install
npm run dev
node server.js
| 255 | 22.272727 | 48 | sh |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/dialcrowd_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 os
from dataclasses import dataclass, field
from typing import Any, Dict, List, Union,... | 3,861 | 34.109091 | 122 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/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,350 | 26.571429 | 94 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/hydra_configs/conf/example.yaml | #@package _global_
defaults:
- /mephisto/blueprint: dialcrowd_static_blueprint
- /mephisto/architect: local
- /mephisto/provider: mock
mephisto:
blueprint:
data_jsonl: ${task_dir}/data.jsonl
extra_source_dir: ${task_dir}/webapp/src/static
subtasks_per_unit: 4
task_source: ${task_dir}/webapp/buil... | 943 | 33.962963 | 87 | yaml |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/images/__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/dialcrowd/webapp-config/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.
*/
| 185 | 30 | 66 | css |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/webapp-config/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/tasks/dialcrowd/webapp-results/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.
*/
| 185 | 30 | 66 | css |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/webapp-results/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/tasks/dialcrowd/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.
*/
.hidden {
display: none;
}
| 220 | 21.1 | 66 | css |
null | ParlAI-main/parlai/crowdsourcing/tasks/dialcrowd/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/tasks/model_chat/README.md | # Model chat crowdsourcing task
This task will collect conversations between a human and a model. After each response by the model, the human will optionally be prompted to annotate the model's response by selecting checkboxes that represent customizable attributes of that response.
**NOTE**: See [parlai/crowdsourcin... | 6,629 | 101 | 462 | md |
null | ParlAI-main/parlai/crowdsourcing/tasks/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/model_chat/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.
import copy
from typing import Dict
from omegaconf import DictConfig
import parlai.utils.logging as logging
from parlai... | 4,940 | 36.150376 | 159 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/model_chat/constants.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_1 = 'Person2'
WAITING_MSG = 'Please wait while we match you with another worker...'
ONBOARD_FAIL = '[ONBOARD_FAI... | 362 | 26.923077 | 69 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/model_chat/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 omegaconf import DictConfig, OmegaConf
from mephisto.operations.operator import Operator
f... | 2,559 | 36.101449 | 88 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/model_chat/model_chat_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 os
import pickle
import random
from abc import ABC, abstractmethod
from dataclasses import dataclass,... | 24,120 | 38.672697 | 127 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/model_chat/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,349 | 25.470588 | 94 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/model_chat/utils.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 base64
import datetime
import json
import os
import random
import threading
import time
import unittest
from io i... | 19,639 | 38.123506 | 172 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/model_chat/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 time
import os
import json
from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional, Tupl... | 27,409 | 39.607407 | 135 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/model_chat/worlds_image_chat.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 tempfile import NamedTemporaryFile
from typing import Any, Dict, List, Tuple
from parlai.core.image_featurizers im... | 5,659 | 33.512195 | 87 | py |
null | ParlAI-main/parlai/crowdsourcing/tasks/model_chat/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 |