From f06df225dd3779f2b7015590de2e7a3661733d2d Mon Sep 17 00:00:00 2001 From: duzx16 Date: Wed, 12 Apr 2023 23:34:44 +0800 Subject: [PATCH] Fix turn_idx --- ptuning/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ptuning/main.py b/ptuning/main.py index ecce8c2..b027e9e 100644 --- a/ptuning/main.py +++ b/ptuning/main.py @@ -200,8 +200,8 @@ def main(): else: prompt = "" history = examples[history_column][i] - for i, (old_query, response) in enumerate(history): - prompt += "[Round {}]\n问:{}\n答:{}\n".format(i, old_query, response) + for turn_idx, (old_query, response) in enumerate(history): + prompt += "[Round {}]\n问:{}\n答:{}\n".format(turn_idx, old_query, response) prompt += "[Round {}]\n问:{}\n答:".format(len(history), query) prompt = prefix + prompt