Skip to content

fix(map-elites): reject non-finite fitness and descriptors - #308

Open
lll-hhh wants to merge 1 commit into
ANative-Lab:mainfrom
lll-hhh:fix/map-elites-finite-metrics-refresh-20261125
Open

lll-hhh wants to merge 1 commit into
ANative-Lab:mainfrom
lll-hhh:fix/map-elites-finite-metrics-refresh-20261125

Conversation

@lll-hhh

@lll-hhh lll-hhh commented Nov 24, 2026

Copy link
Copy Markdown

Fixes #294.

MAP-Elites currently admits non-finite fitness into its archive. With evaluator
scores [NaN, 1.0] in one cell, the real optimization loop returns best
fitness NaN and acceptance history [True, False]: the finite improvement
cannot replace the invalid elite. Infinite feature descriptors are also
silently clipped into boundary cells.

This extends the existing numeric validation to reject non-finite fitness and
descriptors with field-specific ValueErrors before archive admission or
binning. NaN descriptors previously failed later inside integer conversion;
they now receive the same clear field-specific diagnostic. Existing selection,
mutation, finite signed fitness, and finite out-of-range descriptor clipping
behavior is preserved.

Validation

Built on main@e3df900662443e94dd92141be5633b040a69a70a.

  • python -m pytest tests/src/optimizers --ignore=tests/src/optimizers/test_sew_workflow_scheme.py -q
    -> 30 passed
  • Ruff check passed for the new regression module.
  • git diff --check passed.

The full suite was not run because this environment lacks optional
RAG/workflow dependencies. No GPU runs, live LLM calls, or optimization-quality
claims are included.

Refresh

This replaces #295 on the current main base. The earlier PR had no maintainer
review and had fallen below active review queues.

AI assistance: Codex reproduced the failure, prepared the patch and ran the
checks. No independent human review is claimed.

@lll-hhh

lll-hhh commented Nov 24, 2026

Copy link
Copy Markdown
Author

The optimizer test group and Ruff check for the new regression module pass locally. The two Actions workflows are waiting for maintainer approval (action_required) rather than failing. Could a maintainer approve them when reviewing?

This branch has not been deployed

No deployments
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.

MAP-Elites admits non-finite fitness and can freeze elite replacement

1 participant