File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -675,23 +675,24 @@ async def run_eval(
675675 app_name : str , eval_set_id : str , req : RunEvalRequest
676676 ) -> list [RunEvalResult ]:
677677 """Runs an eval given the details in the eval request."""
678- from ..evaluation .local_eval_service import LocalEvalService
679- from .cli_eval import _collect_eval_results
680- from .cli_eval import _collect_inferences
681-
682678 # Create a mapping from eval set file to all the evals that needed to be
683679 # run.
684- eval_set = eval_sets_manager .get_eval_set (app_name , eval_set_id )
680+ try :
681+ from ..evaluation .local_eval_service import LocalEvalService
682+ from .cli_eval import _collect_eval_results
683+ from .cli_eval import _collect_inferences
685684
686- if not eval_set :
687- raise HTTPException (
688- status_code = 400 , detail = f"Eval set `{ eval_set_id } ` not found."
689- )
685+ eval_set = eval_sets_manager .get_eval_set (app_name , eval_set_id )
690686
691- root_agent = agent_loader .load_agent (app_name )
687+ if not eval_set :
688+ raise HTTPException (
689+ status_code = 400 , detail = f"Eval set `{ eval_set_id } ` not found."
690+ )
691+
692+ root_agent = agent_loader .load_agent (app_name )
693+
694+ eval_case_results = []
692695
693- eval_case_results = []
694- try :
695696 eval_service = LocalEvalService (
696697 root_agent = root_agent ,
697698 eval_sets_manager = eval_sets_manager ,
You can’t perform that action at this time.
0 commit comments