Skip to content

Skip invalid individuals in evaluation streams - #401

Open
alcides wants to merge 1 commit into
mainfrom
fix/skip-invalid-individuals
Open

Skip invalid individuals in evaluation streams#401
alcides wants to merge 1 commit into
mainfrom
fix/skip-invalid-individuals

Conversation

@alcides

@alcides alcides commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Skip individuals whose fitness evaluation raises InvalidFitnessException.
  • Count invalid evaluation attempts without storing invalid fitness values.
  • Make ParallelEvaluator consume input iterables lazily in bounded batches using a reusable thread pool.
  • Preserve already-evaluated individuals without re-evaluating them.
  • Add sequential and parallel regression tests for invalid individuals in streams.

This addresses the evaluation-stream portion of #336: evaluators can consume streams and omit invalid candidates. The existing GP operators' population-size interfaces remain in place for the follow-up target_size refactor.

Validation

  • uv run --with ruff ruff check . --fix — passed.
  • uv run pytest tests/core/fitness_helpers_test.py -q — 4 passed.
  • Full uv run pytest -q reached 455 passing tests, then was interrupted after approximately five minutes in the existing deep-tree tests/gp/parallel_test.py; no test failure was reported.

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.

1 participant