Skip to content
Snippets Groups Projects
Commit bf9dd000 authored by zqwerty's avatar zqwerty
Browse files

update kvret: change the order of (slot, value) in db entry

parent 82f0b287
No related branches found
No related tags found
No related merge requests found
No preview for this file type
This diff is collapsed.
...@@ -111,7 +111,11 @@ def preprocess(): ...@@ -111,7 +111,11 @@ def preprocess():
scenario = item['scenario'] scenario = item['scenario']
domain = scenario['task']['intent'] domain = scenario['task']['intent']
db_results = {domain: scenario['kb']['items'] if scenario['kb']['items'] else []} slots = scenario['kb']['column_names']
db_results = {domain: []}
if scenario['kb']['items']:
for entry in scenario['kb']['items']:
db_results[domain].append({s: entry[s] for s in slots})
dialogue_id = f'{dataset}-{data_split}-{len(dialogues_by_split[data_split])}' dialogue_id = f'{dataset}-{data_split}-{len(dialogues_by_split[data_split])}'
dialogue = { dialogue = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment