Repository navigation
fix: warn on oversized seeds vs max_code_length and handle inner fences in parse_full_rewrite - #626
Open
peterzhang987723 wants to merge 1 commit into
Conversation
…es in parse_full_rewrite
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
config.max_code_length:openevolve/controller.py, emit clear warnings at initialization if initial or island-seeded programs already exceedconfig.max_code_length(where the default10000can cause near-100% rejection of evolved multi-helper rewrites before evaluation).openevolve/process_parallel.py, count iterations rejected specifically due tomax_code_length(length_rejected_iterations) and surface a diagnostic summary warning so silent length-cliff starvation is immediately actionable.openevolve/utils/code_utils.py:parse_full_rewriteto try matching a standalone closing fence (\r?\n[ \t]*```[ \t]*(?:\r?\n|$)) before falling back to lazy fence matching, preventing truncated extraction when the rewritten Python code embeds triple-backtick examples inside docstrings or string literals.Testing
tests/test_max_code_length_and_fence_parsing.py.pytest tests/test_max_code_length_and_fence_parsing.py tests/test_all_iterations_failed.py tests/test_diff_format_validation_worker.py -q(38 passed in 2.69s).1168 passed, 13 skipped, 18 deselected, 769 subtests passed).