From 752a16f36bb8e3ac066f60fef08e961a26a1d634 Mon Sep 17 00:00:00 2001
From: function2 <function2@qq.com>
Date: Thu, 15 Oct 2020 11:05:46 +0800
Subject: [PATCH] fix bug in last commit

---
 convlab2/dst/dstc9/eval_model.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/convlab2/dst/dstc9/eval_model.py b/convlab2/dst/dstc9/eval_model.py
index aa42cc8..207eac7 100644
--- a/convlab2/dst/dstc9/eval_model.py
+++ b/convlab2/dst/dstc9/eval_model.py
@@ -23,8 +23,9 @@ def evaluate(model_dir, subtask, test_data, gt):
     bar = tqdm(total=sum(len(turns) for turns in test_data.values()), ncols=80, desc='evaluating')
     for dialog_id, turns in test_data.items():
         model.init_session()
+        pred[dialog_id] = []
         for sys_utt, user_utt, gt_turn in turns:
-            pred[dialog_id] = [model.update_turn(sys_utt, user_utt)]
+            pred[dialog_id].append(model.update_turn(sys_utt, user_utt))
             bar.update()
     bar.close()
     result = eval_states(gt, pred, subtask)
-- 
GitLab