(self, pred, label)
| 378 | return "extra" |
| 379 | |
| 380 | def eval_exact_match(self, pred, label): |
| 381 | partial_scores = self.eval_partial_match(pred, label) |
| 382 | self.partial_scores = partial_scores |
| 383 | |
| 384 | for key, score in partial_scores.items(): |
| 385 | if score['f1'] != 1: |
| 386 | return 0 |
| 387 | |
| 388 | if len(label['from']['table_units']) > 0: |
| 389 | label_tables = sorted(label['from']['table_units']) |
| 390 | pred_tables = sorted(pred['from']['table_units']) |
| 391 | return label_tables == pred_tables |
| 392 | return 1 |
| 393 | |
| 394 | def eval_partial_match(self, pred, label): |
| 395 | res = {} |
no test coverage detected