Creating script for launching MTurk compensation tasks #586
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
A long-requested feature, this PR introduces a way to be able to launch compensation tasks for mturk workers directly by their worker ID. This can be useful if someone reaches out with a problem about a task, and you want to be able to pay out to resolve the issue. The task is launched without a live backend, so after running the script the task is live and can be completed.
cc @EricMichaelSmith, as I know this request has been asked by the ParlAI team at one point.
Implementation
One key consideration is that we want to tie any compensation to a task, and as such this script requires that you attach the pay to an existing
task_name
. In doing so, we can then create a unit for that task name, and then mark it as asoft_reject
without tying any agent to it. This will include it in bookkeeping for the total cost of an assignment, but leave it out from any data collation scripts.Under the hood, the script creates a task run for the compensation HIT, and a tied assignment and unit. Then it creates a HIT, marks it in the
MTurkDatastore
, then pushes an email to the worker. It also creates and assigns a qualification that should be unique to the worker, and sets that as a requirement for viewing/completing the task.Testing
Email:
Task: