Skip to content

Commit 62b460c

Browse files
author
tianxin
authored
Fix print format of fewshot (#474)
* "add mlm params to dygraph ernie1.0" * finish p-tuning v1.0 * mend * delete unused coment * add label_normalized * P-tuning: support Chid task of FewCLUE * 1. decouple evaluate and train * 1.add FewCLUE datasets(9/9) 2.implement p-tuning strategy by transform_function 3.unify train_script beteween `chid` task and other 8 tasks of FewCLUE * add README.md * update FewCLUE data * add predict.py for FewCLUE * update README * update README.md * add FewCLUE 9 datasets * update dataset Name * Tiny fix
1 parent 37d96f8 commit 62b460c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/few_shot/p-tuning/ptuning.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,11 @@ def do_train():
203203

204204
dev_accuracy, total_num = evaluate_fn(model, tokenizer, dev_data_loader,
205205
label_norm_dict)
206-
print("epoch:{}\tdev_accuracy:{:.3f}\ttotal_num:{}".format(
206+
print("epoch:{}, dev_accuracy:{:.3f}, total_num:{}".format(
207207
epoch, dev_accuracy, total_num))
208208
test_accuracy, total_num = evaluate_fn(
209209
model, tokenizer, public_test_data_loader, label_norm_dict)
210-
print("epoch:{}\ttest_accuracy:{:.3f}\ttotal_num:{}".format(
210+
print("epoch:{}, test_accuracy:{:.3f}, total_num:{}".format(
211211
epoch, test_accuracy, total_num))
212212

213213
if rank == 0:

0 commit comments

Comments
 (0)