score batch impl

This commit is contained in:
Xi Yan 2024-10-23 16:19:25 -07:00
parent 4b1d7da030
commit eb572faf6f
5 changed files with 38 additions and 7 deletions

View file

@ -211,8 +211,15 @@ class ScoringRouter(Scoring):
async def score_batch(
self, dataset_id: str, scoring_functions: List[str]
) -> ScoreBatchResponse:
# TODO
pass
print("Score Batch!")
for fn_identifier in scoring_functions:
score_response = await self.routing_table.get_provider_impl(
fn_identifier
).score_batch(
dataset_id=dataset_id,
scoring_functions=[fn_identifier],
)
print(score_response)
async def score(
self, input_rows: List[Dict[str, Any]], scoring_functions: List[str]