Repository navigation
fix(parallel): always send the parent's artifacts to the worker - #624
Open
shaojunying wants to merge 1 commit into
Open
shaojunying wants to merge 1 commit into
shaojunying wants to merge 1 commit into
Conversation
The worker snapshot kept artifacts for the first max_snapshot_artifacts programs in insertion order. The worker only reads the parent's artifacts, so a parent added after the first 100 programs got none, and its errors and outputs never reached the prompt. Put the parent first before the limit is applied.
|
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #623
Problem
The worker builds the prompt with the parent's artifacts. The controller sends artifacts only for the first
max_snapshot_artifactsprograms (default 100) in insertion order, and it ignores which program is the parent. A parent added after the first 100 programs gets no artifacts, so its errors and outputs never reach the LLM.Change
_create_database_snapshot()takes an optionalparent_id. It moves the parent to the front of the program list before themax_snapshot_artifactsslice._submit_iteration()passes the sampled parent.max_snapshot_artifactsprograms,Nonefor no limit,0for no artifacts.Verification
tests/test_snapshot_artifacts_limit.py:max_snapshot_artifactsentries;_submit_iteration()passes to the executor contains the parent's artifacts;max_snapshot_artifacts: 0still sends no artifacts.The first two fail on
main.python -m pytest tests --ignore=tests/integration --ignore=tests/alphaevolve_upstreamon Windows, Python 3.12: 29 failed, 1108 passed, 8 skipped. The same 29 tests fail onmainon this machine (POSIX path assumptions,os.killon Windows, locale encoding). No new failures.black --checkpasses on the changed files.