File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -586,16 +586,12 @@ async def run_evolution(
586586
587587 # Check target score
588588 if target_score is not None and child_program .metrics :
589- numeric_metrics = [
590- v for v in child_program .metrics .values () if isinstance (v , (int , float ))
591- ]
592- if numeric_metrics :
593- avg_score = sum (numeric_metrics ) / len (numeric_metrics )
594- if avg_score >= target_score :
595- logger .info (
596- f"Target score { target_score } reached at iteration { completed_iteration } "
597- )
598- break
589+ if ('combined_score' in child_program .metrics and
590+ child_program .metrics ['combined_score' ] >= target_score ):
591+ logger .info (
592+ f"Target score { target_score } reached at iteration { completed_iteration } "
593+ )
594+ break
599595
600596 # Check early stopping
601597 if early_stopping_enabled and child_program .metrics :
You can’t perform that action at this time.
0 commit comments