Skip to content

Commit

Permalink
Added sanity check for Mturk sandbox testing
Browse files Browse the repository at this point in the history
  • Loading branch information
meta-paul committed Nov 16, 2023
1 parent b527961 commit 65d3065
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mephisto/abstractions/providers/mturk/mturk_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ def create_hit_type(
has_locale_qual = True
locale_requirements += existing_qualifications

if not has_locale_qual and not client_is_sandbox(client):
is_sandbox = client_is_sandbox(client)
if not has_locale_qual and not is_sandbox:
allowed_locales = get_config_arg("mturk", "allowed_locales")
if allowed_locales is None:
allowed_locales = [
Expand All @@ -458,6 +459,9 @@ def create_hit_type(
}
)

if is_sandbox:
hit_reward = 0

# Create the HIT type
response = client.create_hit_type(
AutoApprovalDelayInSeconds=auto_approve_delay,
Expand Down

0 comments on commit 65d3065

Please sign in to comment.