gpt4 book ai didi

python - 每个 HIT 创建的作业不能超过 10 个

转载 作者:行者123 更新时间:2023-11-30 21:55:01 25 4
gpt4 key购买 nike

我正在使用下面的代码使用 Boto 3 在 Mechanical Turk 上创建 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',
]
)

关于python - 每个 HIT 创建的作业不能超过 10 个,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57875678/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com