How to add a user to a qualification
I have added qualification to the mechanical turk user interface. How can I add a worker to this. Here's what I'm trying:
qualification_id = '3RVX62BZKNDM4K4RT7JU0YN4QTRLP2' # this has been added
worker_id = 'A1D23ERS0X4J9D' # this user has already answered a HIT
Something like (in pseudocode):
qual = Qualifcation('3RVX62BZKNDM4K4RT7JU0YN4QTRLP2').add_worker('A1D23ERS0X4J9D')
How would I do this in practice so that only my target workers can work with my HITs?
source to share
If you understand the nature of qualifications (as shown below), you can easily find suitable methods for your code.
In mTurk, you assign a qualification to an employee, not the other way around . For example, in the requester's browser UI, you must do the following to assign a qualification to a worker who has already authorized you to hit:
- Switch to
manage > workers
- Find and click on the correct worker ID, then click
assign a qualification type
The Mturk API provides two methods for assigning qualifications:
- Assign a qualification operation (if no qualification is requested from the employee )
- Provision of qualifying work (if the employee has requested qualifications)
With boto, according to this API, you can use the following operations:
-
assign_qualification(qualification_type_id, worker_id, value=1, send_notification=True)
-> boto api link -
grant_qualification(qualification_request_id, integer_value=1)
-> boto API link
Note 1: If I'm not mistaken, you can only assign a qualification to those employees who actually solved one of your hits (or who requested qualifications), but not to those employees with whom you have not matched so far. However, MTurk was recently updated and I don't know if that has changed. Note 2: If you have one final list of worker IDs you want to assign a skill to (like from a previous hit), you might want to consider using command line tools .
source to share