From 2cf769e05e68eec5b275f12d7ee4d2e934f4b719 Mon Sep 17 00:00:00 2001 From: Xi Yan Date: Thu, 13 Mar 2025 15:32:58 -0700 Subject: [PATCH] score_rows / eval_rows --- llama_stack/apis/eval/eval.py | 8 +++++--- llama_stack/apis/scoring/scoring.py | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/llama_stack/apis/eval/eval.py b/llama_stack/apis/eval/eval.py index 552afe0a2..b351dac27 100644 --- a/llama_stack/apis/eval/eval.py +++ b/llama_stack/apis/eval/eval.py @@ -77,7 +77,7 @@ class Eval(Protocol): :return: The job that was created to run the evaluation. """ - @webmethod(route="/eval/rows", method="POST") + @webmethod(route="/eval/evaluate_rows", method="POST") async def evaluate_rows( self, dataset_rows: List[Dict[str, Any]], @@ -85,7 +85,7 @@ class Eval(Protocol): candidate: EvalCandidate, ) -> EvaluateResponse: """Evaluate a list of rows on a candidate. - + :param dataset_rows: The rows to evaluate. :param scoring_fn_ids: The scoring function ids to use for the evaluation. :param candidate: The candidate to evaluate on. @@ -111,7 +111,9 @@ class Eval(Protocol): """ ... - @webmethod(route="/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result", method="GET") + @webmethod( + route="/eval/benchmarks/{benchmark_id}/jobs/{job_id}/result", method="GET" + ) async def job_result(self, benchmark_id: str, job_id: str) -> EvaluateResponse: """Get the result of a job. diff --git a/llama_stack/apis/scoring/scoring.py b/llama_stack/apis/scoring/scoring.py index a67623e22..6aeb36f82 100644 --- a/llama_stack/apis/scoring/scoring.py +++ b/llama_stack/apis/scoring/scoring.py @@ -62,8 +62,8 @@ class Scoring(Protocol): scoring_fn_ids: List[str], ) -> ScoreBatchResponse: ... - @webmethod(route="/scoring/rows", method="POST") - async def score( + @webmethod(route="/scoring/score-rows", method="POST") + async def score_rows( self, dataset_rows: List[Dict[str, Any]], scoring_fn_ids: List[str],