代码之家  ›  专栏  ›  技术社区  ›  Volatil3

mturkapi:无法在仪表板上看到我创建的HIT

  •  1
  • Volatil3  · 技术社区  · 6 年前

    我正在使用所给的教程 here . 上面说命中是创造出来的,但当我走到这里 https://requestersandbox.mturk.com/ 我找不到我创建的项目。尽管单个worker URL确实返回HIT web接口。

    我想知道的原因是,我不仅想自动创建命中,而且还想发布批处理。我的代码如下:

    MTURK_SANDBOX = 'https://mturk-requester-sandbox.us-east-1.amazonaws.com'
        mturk = boto3.client('mturk',
                             aws_access_key_id=ACCESS_KEY,
                             aws_secret_access_key=SECRET,
                             region_name='us-east-1',
                             endpoint_url=MTURK_SANDBOX
                             )
    
        print("I have $" + mturk.get_account_balance()['AvailableBalance'] + " in my Sandbox account")
    
        question = open('questions.xml', encoding='utf8').read()
        new_hit = mturk.create_hit(
            Title='Is this Tweet happy, angry, excited, scared, annoyed or upset?',
            Description='Read this tweet and type out one word to describe the emotion of the person posting it: happy, angry, scared, annoyed or upset',
            Keywords='text, quick, labeling',
            Reward='0.15',
            MaxAssignments=1,
            LifetimeInSeconds=172800,
            AssignmentDurationInSeconds=600,
            AutoApprovalDelayInSeconds=14400,
            Question=question,
        )
        print("A new HIT has been created. You can preview it here:")
        print("https://workersandbox.mturk.com/mturk/preview?groupId=" + new_hit['HIT']['HITGroupId'])
        print("HITID = " + new_hit['HIT']['HITId'] + " (Use to Get Results)")
    
    1 回复  |  直到 6 年前
        1
  •  5
  •   Trenton    6 年前

    Mechanical Turk目前不提供通过API发布一批点击的方法。你必须打电话 CreateHIT 每一个人。

    此外,通过API创建的点击在UI中不可见。你可以通过API看到这些。您还可以使用AWS命令行shell来管理它们,因为它也使用API。

    1. https://blog.mturk.com/tutorial-managing-mturk-hits-with-the-aws-command-line-interface-56eaabb7fd4c
    2. MTurk HITs created Through Java API are not showing on Manage Tab on UI