Skip to content

Commit

Permalink
bug fixed for get_pred
Browse files Browse the repository at this point in the history
  • Loading branch information
lijiaqijane committed Feb 1, 2024
1 parent 351153c commit c231289
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Prediction/pred_gpt_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_pred(model, data_instance, tokenizer, max_length, max_gen, prompt_format
pred = rsp['choices'][0]['message']['content']

ans.append(pred)
groundtruth.append(raw_inputs)
groundtruth.append(data_instance["output"])

else:
preds['qa_pairs'] = eval(data_instance['qa_pairs'])
Expand Down
2 changes: 1 addition & 1 deletion Prediction/pred_opensource_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_pred(model, data_instance, tokenizer, max_length, max_gen, prompt_format
pred = tokenizer.decode(output[context_length:], skip_special_tokens=True)

ans.append(pred)
groundtruth.append(raw_inputs)
groundtruth.append(data_instance["output"])

else:
preds['qa_pairs'] = eval(data_instance['qa_pairs'])
Expand Down

0 comments on commit c231289

Please sign in to comment.