Task¶
A project is comprised of Tasks. Each Task compiles a group of questions into HITs, and tracks the results.
Module author: Michael Romero <michaelrom@zillowgroup.com>
-
class
opencrowd.model.base.task.Task(project_id=None)¶ The task object maintains a pool of questions it uses to generate HITs. It can then push these HITs to Amazon Mechanical Turk workers for completion, then update itself and pull the Assignments down for review.
Parameters: project_id (str) – the project id of the project this task is under. handled automatically if project.add_task is used. -
add_question(question)¶ Add a Question to a Task
Parameters: question (Question) – The question object to add
-
create_HITs(questions_per_assignment, assignments_per_HIT, method='random')¶ Generate [HIT]s from this task’s question pool. Currently only the ‘random’ method is supported.
Parameters: - questions_per_assignment (int) – how many questions to place in each HIT.
- assignments_per_HIT (int) – # workers to find for this HIT
- method – ‘random’
- type – str
-
submit(AMT)¶ submit the HIT through the AMT connection
Parameters: AMT –
-
update(generated_crowdsource, database=None)¶ Update this tasks’s HITs
Parameters: - generated_crowdsource – the crowdsource specifications. see opencrowd/config/opencrowd
- database – database connection, defaults to redis in opencrowd/config/redis
-