Skip to content

feat: integrate parallel evaluator into FunctionOptimizer#2126

Closed
KRRT7 wants to merge 2 commits into
parallel-eval/02-evaluatorfrom
parallel-eval/03-integration
Closed

feat: integrate parallel evaluator into FunctionOptimizer#2126
KRRT7 wants to merge 2 commits into
parallel-eval/02-evaluatorfrom
parallel-eval/03-integration

Conversation

@KRRT7
Copy link
Copy Markdown
Contributor

@KRRT7 KRRT7 commented May 7, 2026

wires the parallel evaluator into the optimization loop. adds:

  • _run_line_profiler_for_winner helper (extract-method refactor)
  • _evaluate_candidates_parallel on FunctionOptimizer — forms batches up to pool_size, deduplicates via normalized code, dispatches results back into the candidate forest

depends on #2125 (evaluator).

this is PR 3/4 in a stack. review and merge in order:

  1. feat: parallel evaluation infrastructure (worktree pool, async subprocess, shared types) #2124 — infrastructure
  2. feat: two-phase parallel candidate evaluator and batch_refine API #2125 — evaluator algorithm
  3. feat: integrate parallel evaluator into FunctionOptimizer #2126 (this) — optimizer integration
  4. fix: race conditions, re-staging bug, and parallel evaluator test suite #2127 — bug fixes + tests

KRRT7 added 2 commits May 6, 2026 20:52
Line profiler needs @Profile instrumented in the main tree, so it
must run after candidate selection rather than inside the worktree.
This method handles write → profile → restore for the parallel path.

Also adds # mypy: ignore-errors — this file has 181 pre-existing
mypy errors unrelated to this PR.
Wires the parallel evaluation path into _evaluate_candidates:
- Checks --parallel-candidates flag to branch between sequential/parallel
- Batches candidates with dedup/normalization gating
- Dispatches repair and refinement futures from evaluation results
- Calls _run_line_profiler_for_winner after selection

New methods: _evaluate_candidates_parallel, _dispatch_refinement,
_dispatch_repair_if_possible.
@KRRT7 KRRT7 force-pushed the parallel-eval/03-integration branch from 31be51f to a47cfad Compare May 7, 2026 01:53
@KRRT7 KRRT7 force-pushed the parallel-eval/02-evaluator branch from ec123fd to 22736d3 Compare May 7, 2026 01:53
@KRRT7 KRRT7 closed this May 7, 2026
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