(self, outs)
| 111 | return {"src": x, "pred": preds, "target": y} |
| 112 | |
| 113 | def test_epoch_end(self, outs): |
| 114 | if self.use_question_stance_approach: |
| 115 | self.handle_end_of_epoch_scoring(outs, self.test_acc, self.test_f1) |
| 116 | |
| 117 | self.log('test_acc_epoch', self.test_acc) |
| 118 | |
| 119 | f1 = self.test_f1.compute() |
| 120 | self.test_f1.reset() |
| 121 | self.log('test_f1_epoch', torch.mean(f1)) |
| 122 | |
| 123 | class_names = ["supported", "refuted", "nei", "conflicting"] |
| 124 | for i, c_name in enumerate(class_names): |
| 125 | self.log("test_f1_" + c_name, f1[i]) |
| 126 | |
| 127 | def handle_end_of_epoch_scoring(self, outputs, acc_scorer, f1_scorer): |
| 128 | gold_labels = {} |
nothing calls this directly
no test coverage detected