每次 HIT 不能创建超过 10 个作业

Can't create more than 10 assignments per HIT

我正在使用下面的代码在 Mechanical Turk 上使用 Boto 3 创建 HIT:

new_hit = mturk.create_hit(
    Title='my title',
    Description='my description',
    Keywords='my, keywords',
    Reward='0.02',
    MaxAssignments=25,
    LifetimeInSeconds=9999,
    AssignmentDurationInSeconds=9999,
    AutoApprovalDelayInSeconds=9999,
    Question='''<?xml version="1.0" encoding="UTF-8"?>
<ExternalQuestion xmlns="http://mechanicalturk.amazonaws.com/AWSMechanicalTurkDataSchemas/2006-07-14/ExternalQuestion.xsd">
<ExternalURL>https://myexternalurl/</ExternalURL>
<FrameHeight>540</FrameHeight>
</ExternalQuestion>'''
)

这应该创建一个具有 25 个分配的 HIT。

但是,当我尝试检索结果时,只有 10 个作业:

results = mturk.list_assignments_for_hit(
    HITId='my HIT ID',
    AssignmentStatuses=['Submitted', 'Approved']
)

# This always maxes out at 10
print 'Number of assignments: ' + str(len(results['Assignments']))

我已经用几个不同的 HIT 和几个不同的 MaxAssignments 值试过了。它总是最多进行 10 次分配。似乎 Mechanical Turk 正在默默地将 MaxAssignments 限制在 10。

我在 Mechanical Turk 文档中找到了两条线索。第一:

HITs created with fewer than 10 assignments cannot be extended to have 10 or more assignments. Attempting to add assignments in a way that brings the total number of assignments for a HIT from fewer than 10 assignments to 10 or more assignments will result in an AWS.MechanicalTurk.InvalidMaximumAssignmentsIncrease exception.

https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/mturk.html#MTurk.Client.create_additional_assignments_for_hit.

第二个:

If a HIT is created with 10 or more maximum assignments, there is an additional fee. For more information, see Amazon Mechanical Turk Pricing.

https://docs.aws.amazon.com/AWSMechTurk/latest/AWSMturkAPI/ApiReference_CreateHITOperation.html

但这并不能解释为什么我不能在第一个实例中为 MaxAssignments 使用大于 10 的值。我没有收到任何错误。

如何为每个 HIT 创建和检索十个以上的作业?

您是否尝试过指定 MaxResults 参数,如下所示:

response = client.list_assignments_for_hit(
    HITId='string',
    NextToken='string',
    MaxResults=123,
    AssignmentStatuses=[
        'Submitted'|'Approved'|'Rejected',
    ]
)