evaluate api update

This commit is contained in:
Xi Yan 2024-11-05 15:03:12 -08:00
parent 1b62188c30
commit 60fc191308

View file

@ -78,17 +78,16 @@ class Eval(Protocol):
@webmethod(route="/eval/evaluate_batch", method="POST") @webmethod(route="/eval/evaluate_batch", method="POST")
async def evaluate_batch( async def evaluate_batch(
self, self,
dataset_id: str, eval_task_def: Union[str, EvalTaskDef], # type: ignore
candidate: EvalCandidate, # type: ignore eval_task_config: EvalTaskConfig, # type: ignore
scoring_functions: List[str],
) -> Job: ... ) -> Job: ...
@webmethod(route="/eval/evaluate", method="POST") @webmethod(route="/eval/evaluate", method="POST")
async def evaluate( async def evaluate(
self, self,
input_rows: List[Dict[str, Any]], input_rows: List[Dict[str, Any]],
candidate: EvalCandidate, # type: ignore
scoring_functions: List[str], scoring_functions: List[str],
eval_task_config: EvalTaskConfig, # type: ignore
) -> EvaluateResponse: ... ) -> EvaluateResponse: ...
@webmethod(route="/eval/job/status", method="GET") @webmethod(route="/eval/job/status", method="GET")