@@ -38,6 +38,9 @@ class LLMModelConfig:
3838
3939 # Reproducibility
4040 random_seed : Optional [int ] = None
41+
42+ # Reasoning parameters
43+ reasoning_effort : Optional [str ] = None
4144
4245
4346@dataclass
@@ -69,6 +72,9 @@ class LLMConfig(LLMModelConfig):
6972 primary_model_weight : float = None
7073 secondary_model : str = None
7174 secondary_model_weight : float = None
75+
76+ # Reasoning parameters (inherited from LLMModelConfig but can be overridden)
77+ reasoning_effort : Optional [str ] = None
7278
7379 def __post_init__ (self ):
7480 """Post-initialization to set up model configurations"""
@@ -121,6 +127,7 @@ def __post_init__(self):
121127 "retries" : self .retries ,
122128 "retry_delay" : self .retry_delay ,
123129 "random_seed" : self .random_seed ,
130+ "reasoning_effort" : self .reasoning_effort ,
124131 }
125132 self .update_model_params (shared_config )
126133
@@ -173,6 +180,7 @@ def rebuild_models(self) -> None:
173180 "retries" : self .retries ,
174181 "retry_delay" : self .retry_delay ,
175182 "random_seed" : self .random_seed ,
183+ "reasoning_effort" : self .reasoning_effort ,
176184 }
177185 self .update_model_params (shared_config )
178186
@@ -305,6 +313,19 @@ class EvaluatorConfig:
305313 max_artifact_storage : int = 100 * 1024 * 1024 # 100MB per program
306314
307315
316+ @dataclass
317+ class EvolutionTraceConfig :
318+ """Configuration for evolution trace logging"""
319+
320+ enabled : bool = False
321+ format : str = "jsonl" # Options: "jsonl", "json", "hdf5"
322+ include_code : bool = False
323+ include_prompts : bool = True
324+ output_path : Optional [str ] = None
325+ buffer_size : int = 10
326+ compress : bool = False
327+
328+
308329@dataclass
309330class Config :
310331 """Master configuration for OpenEvolve"""
@@ -322,6 +343,7 @@ class Config:
322343 prompt : PromptConfig = field (default_factory = PromptConfig )
323344 database : DatabaseConfig = field (default_factory = DatabaseConfig )
324345 evaluator : EvaluatorConfig = field (default_factory = EvaluatorConfig )
346+ evolution_trace : EvolutionTraceConfig = field (default_factory = EvolutionTraceConfig )
325347
326348 # Evolution settings
327349 diff_based_evolution : bool = True
@@ -347,7 +369,7 @@ def from_dict(cls, config_dict: Dict[str, Any]) -> "Config":
347369
348370 # Update top-level fields
349371 for key , value in config_dict .items ():
350- if key not in ["llm" , "prompt" , "database" , "evaluator" ] and hasattr (config , key ):
372+ if key not in ["llm" , "prompt" , "database" , "evaluator" , "evolution_trace" ] and hasattr (config , key ):
351373 setattr (config , key , value )
352374
353375 # Update nested configs
@@ -370,6 +392,8 @@ def from_dict(cls, config_dict: Dict[str, Any]) -> "Config":
370392 config .database .random_seed = config .random_seed
371393 if "evaluator" in config_dict :
372394 config .evaluator = EvaluatorConfig (** config_dict ["evaluator" ])
395+ if "evolution_trace" in config_dict :
396+ config .evolution_trace = EvolutionTraceConfig (** config_dict ["evolution_trace" ])
373397
374398 return config
375399
@@ -438,6 +462,15 @@ def to_dict(self) -> Dict[str, Any]:
438462 "use_llm_feedback" : self .evaluator .use_llm_feedback ,
439463 "llm_feedback_weight" : self .evaluator .llm_feedback_weight ,
440464 },
465+ "evolution_trace" : {
466+ "enabled" : self .evolution_trace .enabled ,
467+ "format" : self .evolution_trace .format ,
468+ "include_code" : self .evolution_trace .include_code ,
469+ "include_prompts" : self .evolution_trace .include_prompts ,
470+ "output_path" : self .evolution_trace .output_path ,
471+ "buffer_size" : self .evolution_trace .buffer_size ,
472+ "compress" : self .evolution_trace .compress ,
473+ },
441474 # Evolution settings
442475 "diff_based_evolution" : self .diff_based_evolution ,
443476 "max_code_length" : self .max_code_length ,
0 commit comments