Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use default diff pattern for repairs
  • Loading branch information
ElliotGestrin committed Mar 13, 2026
commit f2bf52c11af56fb1ac512073e4780a5009048a5c
2 changes: 0 additions & 2 deletions openevolve/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,6 @@ class EvaluatorConfig:
# True → ask the LLM for SEARCH/REPLACE diffs (uses repair_diff_user template)
# False → ask the LLM for a full rewrite (uses repair_full_rewrite_user template)
repair_diff_based: bool = False
# Diff pattern used when repair_diff_based=True; must match the template.
repair_diff_pattern: str = r"<<<<<<< SEARCH\n(.*?)=======\n(.*?)>>>>>>> REPLACE"


@dataclass
Expand Down
2 changes: 1 addition & 1 deletion openevolve/evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ async def _repair_code(
# --- Parse the LLM response ---
if self.config.repair_diff_based:
from openevolve.utils.code_utils import apply_diff
repaired = apply_diff(broken_code, llm_response, self.config.repair_diff_pattern)
repaired = apply_diff(broken_code, llm_response)
else:
from openevolve.utils.code_utils import parse_full_rewrite
repaired = parse_full_rewrite(llm_response, language)
Expand Down