openevolve
openevolve copied to clipboard
It there any problems to return EvaluationResult object in evaluator?
evaluator in examples such as function_minimization return EvaluationResult object, but the README in examples fold say "Return a dictionary, not EvaluationResult object" , it there any problems to return EvaluationResult object in evaluator?
The actual code in openevolve/evaluator.py handles both formats:
def _process_evaluation_result(self, result: Any) -> EvaluationResult:
if isinstance(result, dict):
# Backward compatibility - wrap dict in EvaluationResult
return EvaluationResult.from_dict(result)
elif isinstance(result, EvaluationResult):
return result
I will update the README to indicate that.