MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / eval_exact_match

Method eval_exact_match

single_eval.py:380–392  ·  view source on GitHub ↗
(self, pred, label)

Source from the content-addressed store, hash-verified

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 = {}

Callers 2

evaluateFunction · 0.95
eval_nestedFunction · 0.45

Calls 1

eval_partial_matchMethod · 0.95

Tested by

no test coverage detected