MCPcopy Create free account
hub / github.com/RUC-NLPIR/WebThinker / custom_compare_

Function custom_compare_

scripts/lcb_runner/evaluation/testing_util.py:629–642  ·  view source on GitHub ↗
(output, ground_truth)

Source from the content-addressed store, hash-verified

627
628
629def custom_compare_(output, ground_truth):
630
631 if isinstance(output, list):
632 output_1 = "\n".join(output)
633 if stripped_string_compare(output_1, ground_truth):
634 return True
635
636 if isinstance(output, list):
637 output_2 = [o.lstrip().rstrip() for o in output]
638 output_2 = "\n".join(output_2)
639 if stripped_string_compare(output_2, ground_truth):
640 return True
641
642 return False
643
644
645def stripped_string_compare(s1, s2):

Callers 1

run_testFunction · 0.85

Calls 1

stripped_string_compareFunction · 0.85

Tested by

no test coverage detected