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

Method _remove_prefixes

test/general/lm_eval/tasks/webqs.py:71–80  ·  view source on GitHub ↗
(self, aliases)

Source from the content-addressed store, hash-verified

69 return " " + doc["answers"][0]
70
71 def _remove_prefixes(self, aliases):
72 # Optimization: Remove any alias that has a strict prefix elsewhere in the list
73 # we can do this because if the prefix is acceptable by isgreedy, we can stop looking
74 aliases.sort()
75 ret = [aliases[0]]
76 for alias in aliases[1:]:
77 if not alias.startswith(ret[-1]):
78 ret.append(alias)
79
80 return ret
81
82 def construct_requests(self, doc, ctx):
83 ret = []

Callers 1

construct_requestsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected