mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-11 19:56:03 +00:00
scorer registry
This commit is contained in:
parent
9c501d042b
commit
c50686b6fe
5 changed files with 55 additions and 32 deletions
|
|
@ -5,9 +5,19 @@
|
|||
# the root directory of this source tree.
|
||||
# TODO: make these import config based
|
||||
from llama_stack.apis.evals import * # noqa: F403
|
||||
from llama_stack.providers.impls.meta_reference.evals.scorer.basic_scorers import * # noqa: F403
|
||||
|
||||
from ..registry import Registry
|
||||
|
||||
|
||||
class ScorerRegistry(Registry[BaseScorer]):
|
||||
_REGISTRY: Dict[str, BaseScorer] = {}
|
||||
|
||||
|
||||
SCORER_REGISTRY = {
|
||||
"accuracy": AccuracyScorer,
|
||||
"random": RandomScorer,
|
||||
}
|
||||
|
||||
for k, v in SCORER_REGISTRY.items():
|
||||
ScorerRegistry.register(k, v)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue