Skip to content

KeyError in _sample_exploration_parent #60

@benjaminy

Description

@benjaminy

I have been experimenting with openevolve and the two times I let it run to around 100 iterations (once a bit more, once a bit less) I get the following error:

File "/openevolve/quick_start.py", line 16, in main
best_program = await evolve.run(iterations=1000)
File "/openevolve/openevolve/controller.py", line 231, in run
parent, inspirations = self.database.sample()
File "/openevolve/openevolve/database.py", line 188, in sample
parent = self._sample_parent()
File "/openevolve/openevolve/database.py", line 562, in _sample_parent
return self._sample_exploration_parent()
File "/openevolve/openevolve/database.py", line 591, in _sample_exploration_parent
return self.programs[parent_id]
KeyError: 'd5c8621b-bd6b-48d7-822d-9cf0a1c4b520'

This is after the run has gotten past the population size limit, so my guess is that _enforce_population_limit isn't cleaning up everything it needs to clean up. I am happy to investigate further if this appears to be a real problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions