Skip to content

v0.3.2

Latest

Choose a tag to compare

@codelion codelion released this 18 Jul 13:16
411fb59

Bug fixes

Booleans in metrics are flags, not scores. bool is a subclass of int, so a naive isinstance(value, (int, float)) check silently treated True/False as 1.0/0.0. OpenEvolve's own evaluator emits timeout: True as a metric, so this was not a hypothetical input.

  • Fitness math (utils/metrics_utils.py) — the significant one. When an evaluation timed out, evaluator.py returns {"error": 0.0, "timeout": True}, which safe_numeric_average scored as 0.5 — handing a program that failed outright a mid-range fitness and letting it compete for survival in the MAP-Elites database. Both safe_numeric_average() and get_fitness_score() now exclude booleans, so it correctly scores 0.0. combined_score precedence and feature-dimension exclusion are unaffected.
  • Formatting (utils/format_utils.py) — boolean metrics render as timeout=True rather than a meaningless timeout=1.0000, and are skipped when computing improvements (a flag flipping False → True is not a +1.0000 improvement).

Cleanup

  • Removed the module-level _format_metrics / _format_improvement helpers from controller.py. They were dead code — never called, since the controller imports the shared format_utils versions — and confusingly already contained the bool fix the live path lacked.

Docs

  • README: switched the PyPI downloads badge to the pepy.tech monthly badge, and dropped the GitHub stars badge (GitHub already displays the star count).

Full changelog: v0.3.1...v0.3.2