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

Function plugin_all_permutations

evaluation/test-suite-sql-eval/parse.py:122–125  ·  view source on GitHub ↗
(query_value_replaced: List[str], values: Set[str])

Source from the content-addressed store, hash-verified

120# a generator generating all possible ways of
121# filling values into predicted query
122def plugin_all_permutations(query_value_replaced: List[str], values: Set[str]) -> Iterator[str]:
123 num_slots = len([v for v in query_value_replaced if v == VALUE_NUM_SYMBOL.lower()])
124 for values in itertools.product(*[list(values) for _ in range(num_slots)]):
125 yield plugin(query_value_replaced, list(values))
126
127
128# given the gold query and the model prediction

Callers 1

Calls 1

pluginFunction · 0.85

Tested by

no test coverage detected