MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / _equal

Function _equal

NLP/Text2SQL-BASELINE/text2sql/utils/dusql_evaluation.py:994–1001  ·  view source on GitHub ↗
(p, g)

Source from the content-addressed store, hash-verified

992 Raises: NULL
993 """
994 def _equal(p, g):
995 if str(p) == str(g):
996 return True
997 p = p.strip('"\'') if type(p) is str else p
998 g = g.strip('"\'') if type(g) is str else g
999 if text_utils.is_float(p) and text_utils.is_float(g) and float(p) == float(g):
1000 return True
1001 return False
1002
1003 if type(gold[3]) is dict:
1004 return eval_nested_cond(pred, gold)

Callers 1

eval_condFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected