From 8d6cd8dba95c7221385853299662af1aeaee8ca3 Mon Sep 17 00:00:00 2001
From: zqwerty <zhuq96@hotmail.com>
Date: Wed, 23 Feb 2022 19:49:22 +0800
Subject: [PATCH] update merge result format

---
 convlab2/nlu/jointBERT/unified_datasets/merge_predict_res.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/convlab2/nlu/jointBERT/unified_datasets/merge_predict_res.py b/convlab2/nlu/jointBERT/unified_datasets/merge_predict_res.py
index 6de31fbe..a6be2242 100755
--- a/convlab2/nlu/jointBERT/unified_datasets/merge_predict_res.py
+++ b/convlab2/nlu/jointBERT/unified_datasets/merge_predict_res.py
@@ -15,7 +15,7 @@ def merge(dataset_name, speaker, save_dir, context_window_size, predict_result):
     predict_result = json.load(open(predict_result))
 
     for sample, prediction in zip(data, predict_result):
-        sample['dialogue_acts_prediction'] = prediction['predict']
+        sample['predictions'] = {'dialogue_acts': prediction['predict']}
 
     json.dump(data, open(os.path.join(save_dir, 'predictions.json'), 'w', encoding='utf-8'), indent=2, ensure_ascii=False)
 
-- 
GitLab