Skip to content

fix: retain restored feature statistics during database construction - #510

Merged
codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
liuzhengyang699:fix/restore-feature-statistics
Oct 10, 2026
Merged

codelion merged 1 commit into
algorithmicsuperintelligence:mainfrom
liuzhengyang699:fix/restore-feature-statistics

Conversation

@liuzhengyang699

Copy link
Copy Markdown
Contributor

Constructing ProgramDatabase with a checkpoint db_path calls load(), which restores the MAP-Elites feature statistics. Later in the constructor, self.feature_stats = {} discards those restored ranges. The next candidate is consequently binned against a fresh scale: in the regression, a value of 25 in the saved 0–100 range moves from cell 2 to cell 5.

Initialize the empty statistics before loading the checkpoint so the restored values survive construction. Existing persistence tests explicitly call load() a second time, which masks this path; the new tests exercise construction alone.

Validation: 9 tests passed across tests/test_constructor_feature_stats.py and tests/test_feature_stats_persistence.py. Both new cases fail before the fix. Official isort/Black pre-commit hooks and git diff --check passed.

@CLAassistant

CLAassistant commented Oct 10, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@codelion
codelion merged commit eaf0818 into algorithmicsuperintelligence:main Oct 10, 2026
4 checks passed
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