processor registry

This commit is contained in:
Xi Yan 2024-10-14 16:25:06 -07:00
parent 95fd53d292
commit a22c31b8a4
6 changed files with 33 additions and 10 deletions

View file

@ -4,9 +4,16 @@
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from llama_stack.apis.evals import * # noqa: F403
from llama_stack.providers.impls.meta_reference.evals.processor import * # noqa: F403
from ..registry import Registry
# TODO: decide whether we should group dataset+processor together via Tasks
GeneratorProcessorRegistry = Registry[BaseGeneratorProcessor]()
class GeneratorProcessorRegistry(Registry[BaseGeneratorProcessor]):
_REGISTRY: Dict[str, BaseGeneratorProcessor] = {}
PROCESSOR_REGISTRY = {
"mmlu": MMLUProcessor,
}
for k, v in PROCESSOR_REGISTRY.items():
GeneratorProcessorRegistry.register(k, v)