File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,7 @@ async def _maybe_persist_evaluate_run(
114114
115115_MAX_JSON_BODY_BYTES = 50 * 1024 * 1024 # 50 MB (multipart endpoints allow 10 MB per file)
116116
117+
117118@router .get ("/health" , response_model = StandardResponse [HealthData ])
118119async def health_check ():
119120 return StandardResponse (data = HealthData (status = "ok" , version = __version__ ))
Original file line number Diff line number Diff line change @@ -183,14 +183,16 @@ def run(
183183 )
184184 config = merge_configs (file_config , cli_config )
185185 elif judge_model is not None or threshold is not None or trajectory_match_type is not None :
186- config = config .model_copy (update = {
187- "evaluators" : _apply_builtin_overrides (
188- config .evaluators ,
189- judge_model = judge_model ,
190- threshold = threshold ,
191- trajectory_match_type = trajectory_match_type ,
192- )
193- })
186+ config = config .model_copy (
187+ update = {
188+ "evaluators" : _apply_builtin_overrides (
189+ config .evaluators ,
190+ judge_model = judge_model ,
191+ threshold = threshold ,
192+ trajectory_match_type = trajectory_match_type ,
193+ )
194+ }
195+ )
194196 if trace_files :
195197 config .trace_files = list (trace_files )
196198 if eval_set is not None :
Original file line number Diff line number Diff line change @@ -157,11 +157,11 @@ class EvalParams(BaseModel):
157157 def _validate_evaluators (cls , v : list [EvaluatorDef ]) -> list [EvaluatorDef ]:
158158 if not v :
159159 raise ValueError ("At least one evaluator is required." )
160- duplicate_names = sorted (name for name , count in Counter (evaluator .name for evaluator in v ).items () if count > 1 )
160+ duplicate_names = sorted (
161+ name for name , count in Counter (evaluator .name for evaluator in v ).items () if count > 1
162+ )
161163 if duplicate_names :
162- raise ValueError (
163- "Evaluator names must be globally unique. Duplicate names: " + ", " .join (duplicate_names )
164- )
164+ raise ValueError ("Evaluator names must be globally unique. Duplicate names: " + ", " .join (duplicate_names ))
165165 return v
166166
167167 max_concurrent_traces : int = Field (
Original file line number Diff line number Diff line change 2525
2626
2727def _parse_evaluator_entry (entry : dict [str , Any ]) -> EvaluatorDef :
28- """Parse a single evaluator entry from the YAML config.
29- """
28+ """Parse a single evaluator entry from the YAML config."""
3029 if not isinstance (entry , dict ):
3130 raise ValueError (
3231 f"Each evaluator entry must be a mapping with 'name' and 'type' fields, got { type (entry ).__name__ } : { entry !r} "
Original file line number Diff line number Diff line change @@ -299,13 +299,15 @@ async def evaluate_traces(
299299 )
300300 config = merge_configs (file_config , cli_config )
301301 elif judge_model is not None or threshold is not None :
302- config = config .model_copy (update = {
303- "evaluators" : _apply_builtin_overrides (
304- config .evaluators ,
305- judge_model = judge_model ,
306- threshold = threshold ,
307- )
308- })
302+ config = config .model_copy (
303+ update = {
304+ "evaluators" : _apply_builtin_overrides (
305+ config .evaluators ,
306+ judge_model = judge_model ,
307+ threshold = threshold ,
308+ )
309+ }
310+ )
309311 if trace_files :
310312 config .trace_files = trace_files
311313 if trace_format is not None :
You can’t perform that action at this time.
0 commit comments