MCPcopy Create free account
hub / github.com/OpenSparseLLMs/MoM / register_aggregation

Function register_aggregation

lm-eval-harness/lm_eval/api/registry.py:139–148  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

137
138
139def register_aggregation(name: str):
140 def decorate(fn):
141 assert (
142 name not in AGGREGATION_REGISTRY
143 ), f"aggregation named '{name}' conflicts with existing registered aggregation!"
144
145 AGGREGATION_REGISTRY[name] = fn
146 return fn
147
148 return decorate
149
150
151def get_aggregation(name: str) -> Callable[[], Dict[str, Callable]]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected