(self, doc, results)
| 752 | return lls |
| 753 | |
| 754 | def process_results(self, doc, results): |
| 755 | gold = doc["gold"] |
| 756 | |
| 757 | acc = 1.0 if np.argmax(results) == gold else 0.0 |
| 758 | completion_len = np.array([float(len(i)) for i in doc["choices"]]) |
| 759 | acc_norm = 1.0 if np.argmax(results / completion_len) == gold else 0.0 |
| 760 | |
| 761 | return { |
| 762 | "acc": acc, |
| 763 | "acc_norm": acc_norm, |
| 764 | } |
| 765 | |
| 766 | def higher_is_better(self): |
| 767 | return { |
nothing calls this directly
no outgoing calls
no test coverage detected