Skip to content

Commit

Permalink
Update eval_typing.py
Browse files Browse the repository at this point in the history
  • Loading branch information
zzy14 authored Jul 25, 2019
1 parent ba6a7fa commit 499c6e7
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions code/eval_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,18 +553,12 @@ def loose_micro(true, pred):
recall = num_correct_labels / num_true_labels
return precision, recall, f1( precision, recall)

if False:
result = {'eval_loss': eval_loss,
'eval_accuracy': eval_accuracy,
'macro': loose_macro(true, pred),
'micro': loose_micro(true, pred)
}
else:
result = {'eval_loss': eval_loss,
'eval_accuracy': eval_accuracy,
'macro': loose_macro(true, pred),
'micro': loose_micro(true, pred)
}

result = {'eval_loss': eval_loss,
'eval_accuracy': eval_accuracy,
'macro': loose_macro(true, pred),
'micro': loose_micro(true, pred)
}

if mark:
output_eval_file = os.path.join(args.output_dir, "eval_results_{}.txt".format(x.split("_")[-1]))
Expand Down

0 comments on commit 499c6e7

Please sign in to comment.