Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cli command for mephisto wut #249

Merged
merged 1 commit into from
Sep 17, 2020
Merged

Cli command for mephisto wut #249

merged 1 commit into from
Sep 17, 2020

Conversation

JackUrb
Copy link
Contributor

@JackUrb JackUrb commented Sep 16, 2020

Overview

After #246, it's now possible to set a whole slew of options in mephisto. This is great in that people can now control a whole bunch of things, but it can be confusing. This PR introduces mephisto wut, which should hopefully help people parse through the options they have (as Hydra isn't yet easy to get argument help on just yet).

Usage

mephisto wut

Tells you about mephisto wut

mephisto wut <abstraction>

Tells you about one of the core abstractions in mephisto, or really the set of things that comes after the mephisto. in any of the configuration files. Will tell you available options.

mephisto wut <abstraction>=<instance>

Tells you about the specific arguments for a specific abstraction, with help text

mephisto wut <abstraction>=<instance> [list of argument names]

Tells you only about the arguments you list, rather than dumping all of them.

Testing

mephisto wut

>>> mephisto wut
Usage: mephisto wut <abstraction>[=<type>] [...specific args to check]

mephisto wut <abstraction>

>>> mephisto wut blueprint
The blueprint determines the task content. Valid blueprints are ['parlai_chat', 'mock', 'static_task', 'static_react_task']
>>> mephisto wut requester
The requester is an account for a crowd provider. Valid requester types are ['mock', 'mturk', 'mturk_sandbox']. 
Use `mephisto requesters` to see registered requesters, and `mephisto register <requester type>` to register.
>>> mephisto wut dolphins
Given abstraction dolphins not in valid abstractions ['blueprint', 'architect', 'requester', 'provider', 'task']

mephisto wut <abstraction>=<instance>

>>> mephisto wut architect=local

dest      type    default    help                                choices    required
--------  ------  ---------  ----------------------------------  ---------  ----------
hostname  str     localhost  Addressible location of the server             False
port      str     3000       Port to launch the server on                   False

>>> mephisto wut blueprint=parlai_chat

                Tasks launched from static blueprints need a
                source html file to display to workers, as well as a csv
                containing values that will be inserted into templates in
                the html.
            
dest                      type    default    help                                                                                                        choices    required
------------------------  ------  ---------  ----------------------------------------------------------------------------------------------------------  ---------  ----------
onboarding_qualification  str     ???        Specify the name of a qualification used to block workers who fail onboarding, Empty will skip onboarding.             False
block_qualification       str     ???        Specify the name of a qualification used to soft block workers.                                                        False
world_file                str     ???        Path to file containing ParlAI world                                                                                   True
preview_source            str     ???        Optional path to source HTML file to preview the task                                                                  False
task_description_file     str     ???        Path to file for the extended description of the task. Required if not providing a custom source bundle.               False
custom_source_bundle      str     ???        Optional path to a fully custom frontend bundle                                                                        False
custom_source_dir         str     ???        Optional path to a directory containing custom js code                                                                 False
extra_source_dir          str     ???        Optional path to sources that the frontend may refer to (such as images/video/css/scripts)                             False
context_csv               str     ???        Optional path to csv containing task context                                                                           False
num_conversations         int     ???        Optional count of conversations to have if no context provided                                                         False

>>> mephisto wut task

dest                            type     default    help                                                                                                                   choices    required
------------------------------  -------  ---------  ---------------------------------------------------------------------------------------------------------------------  ---------  ----------
task_name                       unknown  ???        Grouping to launch this task run under, none defaults to the blueprint type                                                       False
task_title                      str      ???        Display title for your task on the crowd provider.                                                                                True
task_description                str      ???        Longer form description for what your task entails.                                                                               True
task_reward                     float    ???        Amount to pay per worker per unit, in dollars.                                                                                    True
task_tags                       str      ???        Comma seperated tags for workers to use to find your task.                                                                        True
assignment_duration_in_seconds  int      1800       Time that workers have to work on your task once accepted.                                                                        False
allowed_concurrent              int      0          Maximum units a worker is allowed to work on at once. (0 is infinite)                                                             True
maximum_units_per_worker        int      0          Maximum tasks of this task name that a worker can work on across all tasks that share this task_name. (0 is infinite)             False

mephisto wut <abstraction>=<instance> [list of argument names]

>>> mephisto wut blueprint=parlai_chat world_file preview_source context_csv

                Tasks launched from static blueprints need a
                source html file to display to workers, as well as a csv
                containing values that will be inserted into templates in
                the html.
            
dest            type    default    help                                                   choices    required
--------------  ------  ---------  -----------------------------------------------------  ---------  ----------
world_file      str     ???        Path to file containing ParlAI world                              True
preview_source  str     ???        Optional path to source HTML file to preview the task             False
context_csv     str     ???        Optional path to csv containing task context                      False

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 16, 2020
Copy link
Contributor

@pringshia pringshia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this. is. AMAZING! 😍

LGTM

@JackUrb JackUrb merged commit 1dbdc7f into master Sep 17, 2020
@JackUrb JackUrb deleted the cli-mephisto-wut branch September 17, 2020 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants