mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-16 06:53:47 +00:00
equality scorer
This commit is contained in:
parent
cad8c8710b
commit
4b1d7da030
5 changed files with 53 additions and 23 deletions
|
@ -217,6 +217,7 @@ class ScoringRouter(Scoring):
|
|||
async def score(
|
||||
self, input_rows: List[Dict[str, Any]], scoring_functions: List[str]
|
||||
) -> ScoreResponse:
|
||||
res = {}
|
||||
# look up and map each scoring function to its provider impl
|
||||
for fn_identifier in scoring_functions:
|
||||
score_response = await self.routing_table.get_provider_impl(
|
||||
|
@ -225,6 +226,6 @@ class ScoringRouter(Scoring):
|
|||
input_rows=input_rows,
|
||||
scoring_functions=[fn_identifier],
|
||||
)
|
||||
print(
|
||||
f"fn_identifier={fn_identifier}, score_response={score_response}",
|
||||
)
|
||||
res.update(score_response.results)
|
||||
|
||||
return ScoreResponse(results=res)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue