Skip to content

Commit 4c61100

Browse files
authored
Merge pull request #345 from algorithmicsuperintelligence/fix-better-prog-calculation
Update controller.py
2 parents dd2e3e4 + 71bb5a7 commit 4c61100

File tree

2 files changed

+1
-23
lines changed

2 files changed

+1
-23
lines changed

openevolve/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version information for openevolve package."""
22

3-
__version__ = "0.2.22"
3+
__version__ = "0.2.23"

openevolve/controller.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -357,28 +357,6 @@ def force_exit_handler(signum, frame):
357357
best_program = self.database.get_best_program()
358358
logger.info("Using calculated best program (tracked program not found)")
359359

360-
# Check if there's a better program by combined_score that wasn't tracked
361-
if best_program and "combined_score" in best_program.metrics:
362-
best_by_combined = self.database.get_best_program(metric="combined_score")
363-
if (
364-
best_by_combined
365-
and best_by_combined.id != best_program.id
366-
and "combined_score" in best_by_combined.metrics
367-
):
368-
# If the combined_score of this program is significantly better, use it instead
369-
if (
370-
best_by_combined.metrics["combined_score"]
371-
> best_program.metrics["combined_score"] + 0.02
372-
):
373-
logger.warning(
374-
f"Found program with better combined_score: {best_by_combined.id}"
375-
)
376-
logger.warning(
377-
f"Score difference: {best_program.metrics['combined_score']:.4f} vs "
378-
f"{best_by_combined.metrics['combined_score']:.4f}"
379-
)
380-
best_program = best_by_combined
381-
382360
if best_program:
383361
if (
384362
hasattr(self, "parallel_controller")

0 commit comments

Comments
 (0)