diff --git a/parlai/crowdsourcing/projects/wizard_of_internet/acceptability.py b/parlai/crowdsourcing/projects/wizard_of_internet/acceptability.py index 6026264c168..b76449af7cd 100644 --- a/parlai/crowdsourcing/projects/wizard_of_internet/acceptability.py +++ b/parlai/crowdsourcing/projects/wizard_of_internet/acceptability.py @@ -128,7 +128,7 @@ def poor_knowledge_selection(messages, persona, stemmer, knwldg_ovlp_thrshld): if msg['id'] != 'Wizard': continue - selections = msg.get('task_data', {}).get('selected_text_candaidtes') + selections = msg.get('task_data', {}).get('selected_text_candidates') if not selections or selections[0][0]: continue diff --git a/parlai/crowdsourcing/projects/wizard_of_internet/compile_results.py b/parlai/crowdsourcing/projects/wizard_of_internet/compile_results.py index e64ac2bf747..60f1cbed290 100644 --- a/parlai/crowdsourcing/projects/wizard_of_internet/compile_results.py +++ b/parlai/crowdsourcing/projects/wizard_of_internet/compile_results.py @@ -10,7 +10,6 @@ Example use: python compile_results.py --task-name wizard-of-internet --output-folder=/dataset/wizard-internet - """ from typing import Dict, Union @@ -102,7 +101,7 @@ def get_context(self): return {'Persona': context_data['form_responses'][0]['response']} return { CONTENTS: context_data.get('text_candidates', ''), - SELECTED_CONTENTS: context_data.get('selected_text_candaidtes', ''), + SELECTED_CONTENTS: context_data.get('selected_text_candidates', ''), } # Must be SEARCH_AGENT return {CONTENTS: context_data['search_results']} diff --git a/parlai/crowdsourcing/projects/wizard_of_internet/webapp/main.js b/parlai/crowdsourcing/projects/wizard_of_internet/webapp/main.js index 94a608b1ad3..460e29f970a 100644 --- a/parlai/crowdsourcing/projects/wizard_of_internet/webapp/main.js +++ b/parlai/crowdsourcing/projects/wizard_of_internet/webapp/main.js @@ -200,7 +200,7 @@ function CustomTextResponse({ task_data: { search_query: searchQuery, text_candidates: searchResults, - selected_text_candaidtes: selectedSearchResults, + selected_text_candidates: selectedSearchResults, } }).then(() => { setTextValue(""); diff --git a/parlai/crowdsourcing/projects/wizard_of_internet/worlds.py b/parlai/crowdsourcing/projects/wizard_of_internet/worlds.py index 45b8643cec8..7c919b4a4d4 100644 --- a/parlai/crowdsourcing/projects/wizard_of_internet/worlds.py +++ b/parlai/crowdsourcing/projects/wizard_of_internet/worlds.py @@ -78,7 +78,7 @@ def _has_selected_sentence_from_search_results(action: Union[Dict, Message]): Whether there is any knowledges selected with this message. """ k_task = 'task_data' - k_selected = 'selected_text_candaidtes' + k_selected = 'selected_text_candidates' if (k_task in action) and (k_selected in action[k_task]): # Boolean value that user has not selected any option return not action[k_task][k_selected][0][0] @@ -508,7 +508,7 @@ def reason_to_reject(self): task_data = msg.get('task_data') if not (task_data and isinstance(task_data, dict)): continue - sel_options = task_data.get('selected_text_candaidtes') + sel_options = task_data.get('selected_text_candidates') if not sel_options or len(sel_options) == 1: # No choices continue if not sel_options[0][0]: