By using AWS re:Post, you agree to the Terms of Use

Questions tagged with Amazon Mechanical Turk

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

HIT Table pulled from Python API not matching UI?

Hi, I fielded a batch on the UI, and am seeing that 90 people responded. But when I pull the HIT table using the below python code, the number of people that it says completed the HIT are 0? Why would that be? Screenshot of the .csv pulled from the Python API vs the screenshot from the UI is attached. I'd really appreciate any help!![! ![Enter image description here](/media/postImages/original/IMeZ1kgUq0SZWXm6yiRnVnuQ) Python code (with sensitive info censored): ################ # SETUP ################## get_ipython().system('pip install boto3') import boto3 as bt import functools as fn import pandas as pd import numpy as np import datetime as dt import xml.etree.ElementTree as ET import math as m import csv import os import time #Switch to this version when doing the actual fielding mturk = bt.client('mturk', aws_access_key_id = "ZZZZZZZZZZZZz", aws_secret_access_key = "ZZZZZZZZZZZ", region_name='us-east-1', ) # #Creates a table of all HITs PAGE_SIZE = 100 #Must be <= 100 all_hits = mturk.list_hits(MaxResults = PAGE_SIZE) next_token = all_hits["NextToken"] hit_table = pd.DataFrame(all_hits['HITs']) while (all_hits['NumResults'] == PAGE_SIZE): print("Using next token: {}".format(next_token)) all_hits = mturk.list_hits( MaxResults=PAGE_SIZE, NextToken=next_token) hit_table = pd.concat([pd.DataFrame(all_hits['HITs']), hit_table], ignore_index=True) next_token = all_hits['NextToken'] hit_table.to_csv('test.csv'))
0
answers
0
votes
5
views
asked 13 days ago

Two Submit Buttons in Mechanical Turk UI

When using the HTML code found in the AWS SageMaker docs for the crowd-entity-annotation UI, I found that the demo code they provide (in https://docs.aws.amazon.com/sagemaker/latest/dg/sms-ui-template-crowd-entity-annotation.html) does not work when creating a layout in MTurk Requester Sandbox. It only works when I add this line: ``` <input type="hidden" name="fake" /> ``` outside of the `</crowd-entity-annotation>` element. However, in the preview, and when I publish the HIT, the UI has two submit buttons, one orange and one gray: ![Enter image description here](/media/postImages/original/IM8w8yyelwS0y5SsMOnY5JQg) A disclaimer needed to be added to make sure the workers did not press the wrong button. This is confusing and leads to poor quality data. How can I correct this? Full code: ``` <script src="https://assets.crowd.aws/crowd-html-elements.js"></script> <crowd-entity-annotation name="crowd-entity-annotation" header="Highlight parts of the text below" labels="[{'label': 'person', 'shortDisplayName': 'per', 'fullDisplayName': 'Person'}, {'label': 'date', 'shortDisplayName': 'dat', 'fullDisplayName': 'Date'}, {'label': 'company', 'shortDisplayName': 'com', 'fullDisplayName': 'Company'}]" text="Amazon SageMaker Ground Truth helps you build highly accurate training datasets for machine learning quickly." > <full-instructions header="Named entity recognition instructions"> <ol> <li><strong>Read</strong> the text carefully.</li> <li><strong>Highlight</strong> words, phrases, or sections of the text.</li> <li><strong>Choose</strong> the label that best matches what you have highlighted.</li> <li>To <strong>change</strong> a label, choose highlighted text and select a new label.</li> <li>To <strong>remove</strong> a label from highlighted text, choose the X next to the abbreviated label name on the highlighted text.</li> <li>You can select all of a previously highlighted text, but not a portion of it.</li> </ol> </full-instructions> <short-instructions> Apply labels to words or phrases. </short-instructions> <div id="additionalQuestions" style="margin-top: 20px"> <h3> What is the overall subject of this text? </h3> <crowd-radio-group> <crowd-radio-button name="tech" value="tech">Technology</crowd-radio-button> <crowd-radio-button name="politics" value="politics">Politics</crowd-radio-button> </crowd-radio-group> <h2> Press the orange colored submit button when you are done! Do NOT press the gray colored submit button! </h2> </div> </crowd-entity-annotation> <input type="hidden" name="fake" /> <script> document.addEventListener('all-crowd-elements-ready', () => { document .querySelector('crowd-entity-annotation') .shadowRoot .querySelector('crowd-form') .form .appendChild(additionalQuestions); }); </script> ```
1
answers
0
votes
26
views
asked 19 days ago