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

Function custom_compare_

opencompass/datasets/apps.py:751–764  ·  view source on GitHub ↗
(output, ground_truth)

Source from the content-addressed store, hash-verified

749
750
751def custom_compare_(output, ground_truth):
752
753 if isinstance(output, list):
754 output_1 = '\n'.join(output)
755 if stripped_string_compare(output_1, ground_truth):
756 return True
757
758 if isinstance(output, list):
759 output_2 = [o.lstrip().rstrip() for o in output]
760 output_2 = '\n'.join(output_2)
761 if stripped_string_compare(output_2, ground_truth):
762 return True
763
764 return False
765
766
767def stripped_string_compare(s1, s2):

Callers 1

run_testFunction · 0.70

Calls 1

stripped_string_compareFunction · 0.70

Tested by

no test coverage detected