mirror of https://github.com/THUDM/ChatGLM-6B
Fix turn_idx in eval
parent
f06df225dd
commit
7607cfe585
|
@ -166,8 +166,8 @@ def main():
|
||||||
else:
|
else:
|
||||||
prompt = ""
|
prompt = ""
|
||||||
history = examples[history_column][i]
|
history = examples[history_column][i]
|
||||||
for i, (old_query, response) in enumerate(history):
|
for turn_idx, (old_query, response) in enumerate(history):
|
||||||
prompt += "[Round {}]\n问:{}\n答:{}\n".format(i, old_query, response)
|
prompt += "[Round {}]\n问:{}\n答:{}\n".format(turn_idx, old_query, response)
|
||||||
prompt += "[Round {}]\n问:{}\n答:".format(len(history), query)
|
prompt += "[Round {}]\n问:{}\n答:".format(len(history), query)
|
||||||
inputs.append(prompt)
|
inputs.append(prompt)
|
||||||
targets.append(examples[response_column][i])
|
targets.append(examples[response_column][i])
|
||||||
|
|
Loading…
Reference in New Issue