We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8e4ec3 commit 52b8085Copy full SHA for 52b8085
openevolve/config.py
@@ -142,6 +142,9 @@ class PromptConfig:
142
max_artifact_bytes: int = 20 * 1024 # 20KB in prompt
143
artifact_security_filter: bool = True
144
145
+ # Improvement areas
146
+ code_length_threshold: Optional[int] = 500
147
+
148
149
@dataclass
150
class DatabaseConfig:
openevolve/prompt/sampler.py
@@ -171,7 +171,7 @@ def _identify_improvement_areas(
171
improvement_areas = []
172
173
# Check program length
174
- if len(current_program) > 500:
+ if self.config.code_length_threshold and len(current_program) > self.config.code_length_threshold:
175
improvement_areas.append(
176
"Consider simplifying the code to improve readability and maintainability"
177
)
0 commit comments