Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed repair model sampling
  • Loading branch information
ElliotGestrin committed Mar 12, 2026
commit a9618830438fa58653355989e75593f8cbf02217
5 changes: 5 additions & 0 deletions openevolve/process_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ def _worker_init(config_dict: dict, evaluation_file: str, parent_env: dict = Non
# Reconstruct model objects
models = [LLMModelConfig(**m) for m in config_dict["llm"]["models"]]
evaluator_models = [LLMModelConfig(**m) for m in config_dict["llm"]["evaluator_models"]]
repair_models = [LLMModelConfig(**m) for m in config_dict["llm"].get("repair_models", [])]

# Create LLM config with models
llm_dict = config_dict["llm"].copy()
llm_dict["models"] = models
llm_dict["evaluator_models"] = evaluator_models
llm_dict["repair_models"] = repair_models
llm_config = LLMConfig(**llm_dict)

# Create other configs
Expand Down Expand Up @@ -118,6 +120,7 @@ def _lazy_init_worker_components():

# Create evaluator-specific components
evaluator_llm = LLMEnsemble(_worker_config.llm.evaluator_models)
repair_llm = LLMEnsemble(_worker_config.llm.repair_models)
evaluator_prompt = PromptSampler(_worker_config.prompt)
evaluator_prompt.set_templates("evaluator_system_message")

Expand All @@ -128,6 +131,7 @@ def _lazy_init_worker_components():
evaluator_prompt,
database=None, # No shared database in worker
suffix=getattr(_worker_config, "file_suffix", ".py"),
repair_llm_ensemble=repair_llm,
)


Expand Down Expand Up @@ -382,6 +386,7 @@ def _serialize_config(self, config: Config) -> dict:
"llm": {
"models": [asdict(m) for m in config.llm.models],
"evaluator_models": [asdict(m) for m in config.llm.evaluator_models],
"repair_models": [asdict(m) for m in config.llm.repair_models],
"api_base": config.llm.api_base,
"api_key": config.llm.api_key,
"temperature": config.llm.temperature,
Expand Down