MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / res_map

Function res_map

rat-sql-gap/seq2struct/datasets/spider_lib/evaluation.py:644–649  ·  view source on GitHub ↗
(res, val_units)

Source from the content-addressed store, hash-verified

642 q_res = cursor.fetchall()
643
644 def res_map(res, val_units):
645 rmap = {}
646 for idx, val_unit in enumerate(val_units):
647 key = tuple(val_unit[1]) if not val_unit[2] else (val_unit[0], tuple(val_unit[1]), tuple(val_unit[2]))
648 rmap[key] = [r[idx] for r in res]
649 return rmap
650
651 p_val_units = [unit[1] for unit in pred['select'][1]]
652 q_val_units = [unit[1] for unit in gold['select'][1]]

Callers 1

eval_exec_matchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected