Skip to content

Commit 3f544a5

Browse files
committed
fixes
1 parent 579a3bc commit 3f544a5

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

examples/r_robust_regression/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
max_iterations: 100
55
checkpoint_interval: 10
66
log_level: "INFO"
7+
file_suffix: ".r"
78

89
# LLM configuration
910
llm:

examples/rust_adaptive_sort/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
max_iterations: 150
55
checkpoint_interval: 15
66
log_level: "INFO"
7+
file_suffix: ".rs"
78

89
# LLM configuration
910
llm:

openevolve/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ class Config:
337337
log_dir: Optional[str] = None
338338
random_seed: Optional[int] = 42
339339
language: str = None
340+
file_suffix: str = ".py"
340341

341342
# Component configurations
342343
llm: LLMConfig = field(default_factory=LLMConfig)

openevolve/controller.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ def __init__(
138138
if not self.file_extension.startswith("."):
139139
self.file_extension = f".{self.file_extension}"
140140

141+
# Set the file_suffix in config (can be overridden in YAML)
142+
if not hasattr(self.config, 'file_suffix') or self.config.file_suffix == ".py":
143+
self.config.file_suffix = self.file_extension
144+
141145
# Initialize components
142146
self.llm_ensemble = LLMEnsemble(self.config.llm.models)
143147
self.llm_evaluator_ensemble = LLMEnsemble(self.config.llm.evaluator_models)
@@ -301,7 +305,7 @@ async def run(
301305
try:
302306
self.parallel_controller = ProcessParallelController(
303307
self.config, self.evaluation_file, self.database, self.evolution_tracer,
304-
file_suffix=self.file_extension
308+
file_suffix=self.config.file_suffix
305309
)
306310

307311
# Set up signal handlers for graceful shutdown

0 commit comments

Comments
 (0)