MCPcopy Create free account
hub / github.com/OpenBitSys/BitDistiller / is_equiv

Method is_equiv

test/general/lm_eval/tasks/hendrycks_math.py:88–102  ·  view source on GitHub ↗
(self, str1, str2, verbose=False)

Source from the content-addressed store, hash-verified

86 return {"acc": True}
87
88 def is_equiv(self, str1, str2, verbose=False):
89 if str1 is None and str2 is None:
90 print("WARNING: Both None")
91 return True
92 if str1 is None or str2 is None:
93 return False
94
95 try:
96 ss1 = self.strip_string(str1)
97 ss2 = self.strip_string(str2)
98 if verbose:
99 print(ss1, ss2)
100 return ss1 == ss2
101 except Exception:
102 return str1 == str2
103
104 def remove_boxed(self, s):
105 if "\\boxed " in s:

Callers 1

process_resultsMethod · 0.95

Calls 1

strip_stringMethod · 0.95

Tested by

no test coverage detected