Make max snapshot artifacts limit configurable #386
Merged
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.
Summary
Adds a new config option
database.max_snapshot_artifactsto control how many program artifacts are included in worker process snapshots.Before: Hardcoded limit of 100 artifacts
After: Configurable via
database.max_snapshot_artifacts(default: 100)Usage
Notes
nullremoves the limit entirely (use with caution for large populations as this can significantly increase memory usage and slow worker initialization)population_sizesetting - artifacts can only exist for programs in the databaseTest coverage
This PR also adds comprehensive tests for recent features:
test_llm_config_optional_params.py- Tests for optional temperature/top_p (PR Fix Anthropic models error when both temperature and top_p are passed #385)test_snapshot_artifacts_limit.py- Tests for max_snapshot_artifacts (this PR)test_visualization_sanitization.py- Tests for -inf/NaN sanitization (PR Fix visualization with -inf scores (from PR #380) #384)test_early_stopping_config.py- Tests for early stopping config (PR ARC-AGI-2 example + Event-based early stopping #375)test_changes_description.py- Tests for changes description (PR Large codebase support through LLM changes description + TSP example using this approach #376)Test count increased from 264 to 326 tests.
Test plan
Closes #383
🤖 Generated with Claude Code