Skip to content

Conversation

Henry-Louis
Copy link

This PR fixes a critical bug where the database could crash with a KeyError during parent sampling. The issue occurred because the population cleanup mechanism did not remove culled program IDs from the 'archive' and 'feature_map', leading to stale references. The patch ensures a complete cleanup, making the evolution process more robust.

The _enforce_population_limit function did not remove culled program IDs from self.archive and self.feature_map. This caused a KeyError when the sampling logic later tried to access a program ID that no longer existed in the main self.programs dictionary. This patch ensures that culled programs are removed from all relevant data structures, making the evolution process more robust.
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codelion
Copy link
Owner

This should be fixed in main now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants