Repository navigation
Conversation
…+ Tests Pull initial-program evaluation, insertion and artifact storage into _add_initial_program, then call it for each configured island seed with target_island set. Missing seed files fail at construction, a different extension only warns, as does a seed the population strategy rejects. Seeds are added only on a fresh start, so resuming from a checkpoint does not duplicate them.
… + Test Move the checks into DatabaseConfig.validate_island_initial_programs() and also call it from OpenEvolve.__init__, since a Config built in Python never passes through from_dict. Without it, extra entries wrapped onto island 0. Correct the configs/README note on null islands.
1. configs/island_config_example.yaml: island_initial_programs example right after num_islands, with the same rules as default_config.yaml. 2. configs/README.md: the example line is commented out, so copying the snippet doesn't cause and error due to a missing seed file.
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.
Closes #55. Supersedes the stale draft #126 with the config-based design suggested there.
What
New
database.island_initial_programs: List[Optional[str]]. Entry i is the program island istarts from;
null/missing keeps today's behaviour. The positionalinitial_programstill seedsisland 0, so entry 0 must be
null. No CLI, API or worker changes.How
DatabaseConfig.validate_island_initial_programs(): rejects more entries thannum_islandsand anon-null entry at index 0 (mirrors
island_system_messages). Called fromConfig.from_dictand fromOpenEvolve.__init__, since aConfigbuilt in code skips the check infrom_dict.Config.from_yamlresolves relative paths against the config file, liketemplate_dir._add_initial_program; eachseed is added with
target_island=ion a fresh start only, so resuming does not duplicate seeds.population_strategy.admit, only warns.Testing
tests/test_island_initial_programs.py(14 tests): placement and island metadata,validation, path resolution, artifacts, rejected seeds, checkpoint resume, unchanged behaviour
without the field.
main.Notes
program's language: the evaluator writes every program with the main program's suffix, and
config.languagecomes from the main program. A different extension doesn't always mean adifferent language (
.ccvs.cpp,.mjsvs.js, a seed saved without an extension), andthose seeds work correctly, so raising an error would block valid setups. A seed that really is
in another language doesn't crash the run: the evaluator rejects it, it scores poorly, and the
startup warning flags it. Happy to make this an error instead if you'd prefer to fail fast.