Skip to content

Commit 3f2a575

Browse files
committed
Clarify artifact serialization limit in comments
Expanded comments to explain the rationale for limiting artifact serialization to the first 100 programs, detailing the impact on memory usage and worker initialization speed. No functional changes were made.
1 parent fe3430f commit 3f2a575

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

openevolve/process_parallel.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,12 @@ def _create_database_snapshot(self) -> Dict[str, Any]:
343343
}
344344

345345
# Include artifacts for programs that might be selected
346-
# (limit to reduce serialization overhead)
346+
# IMPORTANT: This limits artifacts (execution outputs/errors) to first 100 programs only.
347+
# This does NOT affect program code - all programs are fully serialized above.
348+
# With max_artifact_bytes=20KB and population_size=1000, artifacts could be 20MB total,
349+
# which would significantly slow worker process initialization. The limit of 100 keeps
350+
# artifact data under 2MB while still providing execution context for recent programs.
351+
# Workers can still evolve properly as they have access to ALL program code.
347352
for pid in list(self.database.programs.keys())[:100]:
348353
artifacts = self.database.get_artifacts(pid)
349354
if artifacts:

0 commit comments

Comments
 (0)