MCPcopy Create free account
hub / github.com/InternScience/SciReason / custom_compare_

Function custom_compare_

opencompass/datasets/taco.py:701–714  ·  view source on GitHub ↗
(output, ground_truth)

Source from the content-addressed store, hash-verified

699
700
701def custom_compare_(output, ground_truth):
702
703 if isinstance(output, list):
704 output_1 = '\n'.join(output)
705 if stripped_string_compare(output_1, ground_truth):
706 return True
707
708 if isinstance(output, list):
709 output_2 = [o.lstrip().rstrip() for o in output]
710 output_2 = '\n'.join(output_2)
711 if stripped_string_compare(output_2, ground_truth):
712 return True
713
714 return False
715
716
717def stripped_string_compare(s1, s2):

Callers 1

run_testFunction · 0.70

Calls 1

stripped_string_compareFunction · 0.70

Tested by

no test coverage detected